Cannot detection collision

I’m scripting a sword hit to apply damage. The problem is that Unity does not detect any collision.

Here’s the test script,

    var damageAmount = 20;
var isHitting : boolean = false;

function OnCollisionEnter (collision : Collision) {
	isHitting = true;
	if (collision.gameObject.GetComponent(Tagger).canBeHit == true){
		collision.gameObject.SendMessage("applyDamage", damageAmount, SendMessageOptions.DontRequireReceiver);


For some weird reasons, the isHitting boolean does not turn true. Both my object that have the script and the one I hit have a collider.

Try adding a rigidbody to your object, unless you have. Just moving a collider around won’t trigger collisions. It has to be a rigidbody on either end of the collision. If you don’t want it affected by physics, set it to kinematic in the inspector. This should enable your collision callbacks.