C# Ignore Collision Trigger From Child

Is there a way to ignore the collision from a child? I have Both a child and the parent that have colliders set with is trigger set to true and the child keeps executing the parent’s OnTriggerEnter function. I’ve tried separating them by assigning different tags but it still occurs.

Tags do not affect collision detection, and unfortunately, there is currently no parameter that tells you information about the collider that called ontriggerenter. You have two choices: ether place the child on a separate layer and use the Layer collision matrix in the physics settings, or disable the child/just its collider.

When you’re assigning a GameObject to another making it a child of that GameObject meaning you’re getting the attributes of that “parent” to the child making it the same. So in collisions when the collision wants to detect a certain object that child is also part of the object causing the collision to be TRUE.

One solution for that is to place the child object to a separate object and make it follow the parent so that it won’t have the attributes that the parent has.