Hey
I am trying to make a simple collision detection scprit. I have tried it several times in different projects, and it seems to not work. It is written in C#, i have tried using this in various formats and it still doesnt work.
Can someone tell me whats wrong? or is it something that i must put onto my game objects? they all have box collides already.
function OnCollisionEnter(theCollision : Collision){
if(theCollision.gameObject.tag == "Player"){
Debug.Log("Hit the Good_Fruit");
}
else Debug.Log("no collision yet !!!@@#@!$ ");
}
Thanks
↧