I’m creating an asteroid game where you walk around, collecting crystals and if you get hit by a meteor, you die. For some reason unity doesn’t seem to be recognizing the collision. here’s the collision code.
function OnCollisionEnter(meteor : Collision){
if (meteor.gameObject.tag == "spaceRock")
{
Debug.Log("LostLife");
lives--;
transform.position = Vector3(0, 0.01858044, 0);
}
}
thanks