var otherCollider : Collider;
function OnCollisionEnter(collision : Collision)
{
var contact : ContactPoint = collision.contacts[0];
print("This collider collided with: " + contact.otherCollider.name);
}
i am making a game like fruit naja,now i want to the name of the fruit which was cut by knife,fruit and knife all attached Box and Rigidbody,
But when i run the game ,the fruit was cut with nothing happen ,i want the name……
is the code wrong or the ‘OnCollisionEnter’ not working?