- Home /
              This question was 
             closed Dec 06, 2014 at 10:08 PM by 
             tanoshimi for the following reason: 
             
 
            Collision events are only sent if objects have a rigidbody and collider attached. http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionEnter.html
 
               Question by 
               onebadbaggins · Dec 06, 2014 at 10:06 PM · 
                collision-detectioncollision-error  
              
 
              onCollisionEnter issue. Very simple script.
I have a first person controller, terrain and a sphere. I have a script attached to my sphere with the code
 function OnCollisionEnter(collision : Collision) {
 
 Destroy(gameObject);
 
 
 }
I expect it destroy the sphere when I run into it with my first person controller how ever nothing happens.
Nothing also prints with the code
 function OnCollisionEnter(collision : Collision) {
 
 Debug.Log("Collision");
 
 
 }
               Comment
              
 
               
               koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                