Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: kici on March 16, 2016, 09:49:03 AM

Title: Trigger Event recognizes children? [SOLVED]
Post by: kici on March 16, 2016, 09:49:03 AM
Scene: "parent" object, with a rigidbody and a capsule collider tagged as "Player".
Child object with a trigger on it as well (For other purposes) and not tagged as Player. (trigger covers more area than its parent, therefore its bigger)

Why does the trigger event on the Parent actually use the child as a trigger detection? The FSM is on the Parent itself, if this is a bug can you fix it please? or how can I?
If this is done purposely, how can I ensure that it only uses the parent for this specific FSM / trigger event...?

Thank you.
Title: Re: Trigger Event recognizes children?
Post by: mdotstrange on March 16, 2016, 10:48:03 AM
Try adding rigid body tags set to IsKinematic to each child-
Title: Re: Trigger Event recognizes children?
Post by: kici on March 16, 2016, 10:55:17 AM
Try adding rigid body tags set to IsKinematic to each child-

Is this a bug though ? Why would the fsm read a trigger from a child when not specified ?

I prefer to stay away from adding another Rigidbody on there as I'm targeting a mobile build.
Title: Re: Trigger Event recognizes children?
Post by: kici on March 16, 2016, 07:46:03 PM
I just want to confirm that adding a Rigidbody to the child solves this issue.
Title: Re: Trigger Event recognizes children?
Post by: mdotstrange on March 17, 2016, 12:20:26 AM
I'm pretty sure its a Unity issue and not a Playmaker one- if its set to isKinematic its not as intensive as a live rigid body
Title: Re: Trigger Event recognizes children?
Post by: kici on March 17, 2016, 09:44:34 AM
Okay,  thanks appreciated. I'll keep this as a solution for   now.

Hopefully gets resolved in the future.
Title: Re: Trigger Event recognizes children?
Post by: Alex Chouls on March 17, 2016, 09:55:09 AM
I think what you're describing is just the way Unity works:
http://answers.unity3d.com/questions/410711/trigger-in-child-object-calls-ontriggerenter-in-pa.html

It's the Unity solution for setting up compound colliders.

So the workaround might be the real solution, at least until Unity redesigns that system someday...
Title: Re: Trigger Event recognizes children?
Post by: kici on March 17, 2016, 10:58:12 AM
I think what you're describing is just the way Unity works:
http://answers.unity3d.com/questions/410711/trigger-in-child-object-calls-ontriggerenter-in-pa.html

It's the Unity solution for setting up compound colliders.

So the workaround might be the real solution, at least until Unity redesigns that system someday...

Makes sense, thanks for clarifying this and proving the links.

Awesome support.
Title: Re: Trigger Event recognizes children? [SOLVED]
Post by: WabbysLand on April 28, 2019, 01:18:28 PM
I confirm : this issue is still there in 2019 and the workaround works too  :-\
Title: Re: Trigger Event recognizes children? [SOLVED]
Post by: Thore on May 04, 2019, 08:30:44 PM
This has changed, afaik. There are composite colliders now, which require a rigidbody only on the parent, and you must tick the composite box on each collider underneath. It then treats the whole thing as one.

Title: Re: Trigger Event recognizes children? [SOLVED]
Post by: djaydino on May 05, 2019, 01:18:04 PM
Hi.
I never knew that existed!

We learn every day :D

I usually have a 'Data' fsm on the game object with the collider which has a game object variable holding the parent. which i can then get for referencing