21 Eylül 2014 Pazar

Unity OnCollisionEnter - OnTriggerEnter

Some notes:

In order to work with OnCollisionEnter:

At least one object should have a non-kinematic Rigidbody and the IsTrigger option of the Collider should be not checked. Both objects should have Colliders attached.

To work with OnTriggerEnter

At least one object should have a Rigidbody and both should have Colliders with IsTrigger option attached.


These options are probably same for the OnCollisionEnter2d and OnTriggerEnter2d.
You should use Collider2d and Rigidbody2D instead

Good luck : )