playMaker

Author Topic: Trigger Event recognizes children? [SOLVED]  (Read 6563 times)

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Trigger Event recognizes children? [SOLVED]
« 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.
« Last Edit: March 17, 2016, 11:25:54 AM by Alex Chouls »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Trigger Event recognizes children?
« Reply #1 on: March 16, 2016, 10:48:03 AM »
Try adding rigid body tags set to IsKinematic to each child-
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Re: Trigger Event recognizes children?
« Reply #2 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.

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Re: Trigger Event recognizes children?
« Reply #3 on: March 16, 2016, 07:46:03 PM »
I just want to confirm that adding a Rigidbody to the child solves this issue.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Trigger Event recognizes children?
« Reply #4 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
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Re: Trigger Event recognizes children?
« Reply #5 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.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Trigger Event recognizes children?
« Reply #6 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...

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • KZ Development
Re: Trigger Event recognizes children?
« Reply #7 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.

WabbysLand

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Trigger Event recognizes children? [SOLVED]
« Reply #8 on: April 28, 2019, 01:18:28 PM »
I confirm : this issue is still there in 2019 and the workaround works too  :-\

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Trigger Event recognizes children? [SOLVED]
« Reply #9 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.

« Last Edit: May 06, 2019, 03:01:15 AM by Thore »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Trigger Event recognizes children? [SOLVED]
« Reply #10 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