Search code examples
unity-game-enginetriggerscollider

Unity can a trigger collider activate OnCollisionEnter


As the title says: can a trigger collider of an object trigger the "OnCollisionEnter" function of antoher object with a normal collider?


Solution

  • No. The OnCollisionEnter function won't be called when one collider is normal and the other is trigger. If you're seeing something different on your side then it's a bug.

    Although, this is possible when you want to do the opposite with OnTriggerEnter but one of the colliders must have Rigidbody attached to it for OnTriggerEnter to be called. It doesn't matter which one.

    Take a look at the Collision action matrix from the doc or the image below for scenarios in which OnCollisionEnter would be called:

    enter image description here