Problem with OnCollisionEnter on joints

Hi to all,

because i am using Unity free version and i do not have access to the animation curves to manipulate my character’s collider during animations i added colliders to leg joints instead which works pretty well.
My problem is that when i apply on them an OnCollisionEnter script is not working. Script os o.k because applying it to the character mesh it works fine. I tried to create an empty gameObject and apply the script there but again no luck. I even added a capsule object on the joint but still.
Any ideas ?

thanks in advance.

You must add a rigidbody to your object.You should not add the script to an empty gameobject. Use can try using ontriggerenter as I give below.

void OnTriggerEnter(Collider a)
Debug.Log("I hit on Wall");

Dont forget to check ‘isTrigger’ option under rigidbody.