My script prints only once no matter how many times it hits the floor
function OnCollisionEnter (theCollision : Collision) { Debug.Log(" Hit !! " + theCollision.gameObject.name ); }
So i updated the code and it worked !
var countofhits = 0; function OnCollisionEnter (theCollision : Collision) { countofhits++; Debug.Log(countofhits + " Hit !! " + theCollision.gameObject.name ); }
But i dnt knw why this happened
can anyone explain ?