playMaker

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

kici

  • Junior Playmaker
  • **
  • Posts: 63
    • View Profile
    • KZ Development
Trigger Event recognizes children? [SOLVED]
« on: March 16, 2016, 06: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, 08:25:54 AM by Alex Chouls »

mdotstrange

  • Hero Member
  • *****
  • Posts: 549
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: Trigger Event recognizes children?
« Reply #1 on: March 16, 2016, 07: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
    • View Profile
    • KZ Development
Re: Trigger Event recognizes children?
« Reply #2 on: March 16, 2016, 07: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
    • View Profile
    • KZ Development
Re: Trigger Event recognizes children?
« Reply #3 on: March 16, 2016, 04:46:03 PM »
I just want to confirm that adding a Rigidbody to the child solves this issue.

mdotstrange

  • Hero Member
  • *****
  • Posts: 549
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: Trigger Event recognizes children?
« Reply #4 on: March 16, 2016, 09:20:26 PM »
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
    • View Profile
    • KZ Development
Re: Trigger Event recognizes children?
« Reply #5 on: March 17, 2016, 06: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: 3202
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Trigger Event recognizes children?
« Reply #6 on: March 17, 2016, 06: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
    • View Profile
    • KZ Development
Re: Trigger Event recognizes children?
« Reply #7 on: March 17, 2016, 07: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.