title: collision between 2 objects C#
body: <pre><code>using UnityEngine;
  using System.Collections;
  
  public class CollisionExample : MonoBehaviour {
  
  void OnCollisionEnter (Collision other){
      if(other.gameObject.name == "joint_HandRight")
      {
          this.gameObject.renderer.material.color = Color.green;
      }
  }
  
  void OnCollisionStay (Collision other){
      if(other.gameObject.name == "joint_HandRight")
      {
          this.gameObject.renderer.material.color = Color.green;
      }
  
  }
  
  void OnCollisionExit (Collision other){
      if(other.gameObject.name == "joint_HandRight")
      {
          this.gameObject.renderer.material.color = Color.red;
      }
   }
  }
  </code></pre>
  
  <p>Í have a torus object named <code>TorusPro</code> and a box object with the named <code>joint_HandRight</code>.
  This is the code I use on the script which is attached to my Torus object. I want its color to change when the object with the name joint_HandRight collides. It's not working. Why?</p>