Filip A.
Filip A.

Reputation: 81

Child Trigger event on parent Script

I am making a game in Unity3D and I have this situation.

I have a parent with some children. Eg:

Parent:

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?

Upvotes: 1

Views: 1339

Answers (1)

Filip A.
Filip A.

Reputation: 81

I solved it by putting a kinematic rigidbody on the child.

Upvotes: 1

Related Questions