- Home /
Child Trigger event on parent Script
Hi. I have this situation.
I have a parent with some children. Eg:
Parent:
Child 1
Child 2
Child 3
On Parent and Child 3 i have the component Box Collider 2D with the property Is Trigger checked.
On the parent i have a script with OnTriggerEnter2D function
But if Child 3 collide with another object it trigger the function on the parent's script.
I don't need to trigger the event when the Child collide.
What I can do?
This behavior should not be happening, I recreated the situation you described and everything works fine. I think you missed something, you sure you don't have any script on child3?
I solved it by putting a kinematic rigidbody on the child.
Answer by RakshithAnand · Jul 01, 2014 at 11:08 AM
isKinematic should be checked, in child's rigidbody so that the child's trigger enter wont call the parents's trigger enter
Your answer
Follow this Question
Related Questions
Make a simple tree 1 Answer
inside a script is there a way to disconnect a child from its paretn in c# 1 Answer
How can i make GetComponent(SCRIPT) apply to ONLY ONE object that has the script? 1 Answer
Rotate similar child objects around own origin 2 Answers
Update Parent/ Children From Script? 2 Answers