playMaker

Author Topic: Collision and Trigger event mixes BUG?[SOLVED]  (Read 2539 times)

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Collision and Trigger event mixes BUG?[SOLVED]
« on: February 27, 2017, 08:52:04 PM »
So,

I have a trigger event and a collision event on my FSM.

When an Rigidbody with Collider (non trigger) hits another Object with Collider (non trigger), The Trigger FSM event gets called.

Also does the collision event (depending on which order they are in, first one gets called first).

Why would a trigger event be called on a collision event?

Aren't these 2 supposed to be separated?

I have 2 states 1 for "Trigger", one for "Collision", and of course both of these will have different actions to follow up,

How do I ensure these 2 are not mixing up?


To make things more interesting, the Collision event does not detect Triggers, but the Trigger event detects collision events...

CORRECTION: Trigger gets called even though Collision Event is first... Also oddly enough, the Trigger object name is never the actual name of the object the char hit. It randoms between the ground walked upon and other stuff throughout the scene. Keep in mind that this trigger and collision event is only for tagged units under "Enemy", none of the other scene stuff is tagged that yet it shows their names.

Thank you.
« Last Edit: March 01, 2017, 01:00:56 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Collision and Trigger event mixes BUG?
« Reply #1 on: February 28, 2017, 08:26:34 AM »
Hi,

 I think your scene is likely not configured the way you expect it, maybe you have childs of your GameObject that have colliders set to trigger and vice versa?

 I never had any trouble with this and triggers getting mixed up with colliders, so if you have a clear repro case, can you send it to me, I'll have a look.

 Bye,

 Jean

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Re: Collision and Trigger event mixes BUG?
« Reply #2 on: February 28, 2017, 08:31:30 PM »
Thanks Jean,

It seems you are correct.

I am using Adventure Creator and it is the hotspot detector causing this havoc.

I'll work around it,

Appreciated your swift response.

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Re: Collision and Trigger event mixes BUG?
« Reply #3 on: February 28, 2017, 08:33:23 PM »
Can I somehow ignore the children?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Collision and Trigger event mixes BUG?
« Reply #4 on: March 01, 2017, 01:00:40 AM »
Hi,

 nop, it's by design within Unity. However you can tag objects and then you can use the dedicated actions for triggers and collider listener and filter by tag or layers manually.

 Bye,

 Jean

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Re: Collision and Trigger event mixes BUG?[SOLVED]
« Reply #5 on: March 02, 2017, 06:26:28 PM »
Just to clarify this for anyone else if you run into it,

even though the tag is different it will still trigger, but having them on a different layout does the trick,

Thank you.