Another n00b question from me
I am trying to destroy the gameobject I collided with
I thought that using Destroy(theCollision); could work, but it dont:'(
function OnCollisionEnter(theCollision : Collision){
if(theCollision.gameObject.name == "BadBall(Clone)"){
Debug.Log("Hit something bad");
//destroy the gameobject and do other stuff here
}
else if(theCollision.gameObject.name == "PointBall(Clone)"){
Debug.Log("Hit something awsome!");
//destroy the gameobject and do other stuff here
}
}
thanks in advance:)