OnCollisionEnter do not detect collision

Both of objects are Rigid non kinematic trigger bodies with next script attached to one of them:

Test.js

function OnCollisionEnter (col : Collision) {
    	Debug.Log("test");
    }

Btw, would like to understand better difference between OnCollisionEnter and OnTriggerEnter, cause the last one works fine without any problems.

OnCollisionEnter is not raised when your collider is a trigger as you said. The difference is that objects entering a trigger will not collide with it - quite self-explanatory.

  • If isTrigger is checked, then OnTriggerEnter is raised and objects don’t collide.
  • If isTrigger is not checked, then OnCollisionEnter is raised and objects physically collide.

The last part of this page (Collision action matrix) is also very helpful I think, because it shows for different situations if trigger or collision messages are sent