help!help!why did not it tirgger???

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?

Are either marked as being kinematic?

no ,the fruit did’t,cause i need to give the fruit a muzzle velocity ,if i elected the kinematic,there is a error:

Actor::setLinearVelocity: Actor must be (non-kinematic) dynamic!
UnityEngine.Rigidbody:set_velocity(Vector3)

there is another way to achieve collision judgement?

it is a grateful to show me a case of code

thank you!