function OnCollisionEnter()
{
print(“hit”);
}
I added this to a cube in my game, however when other spheres collide with it, nothing happens. I heard in a tutorial that this is meant to work for simple collision.
function OnCollisionEnter()
{
print(“hit”);
}
I added this to a cube in my game, however when other spheres collide with it, nothing happens. I heard in a tutorial that this is meant to work for simple collision.
As cdrandin said, add a Rigidbody to at least 1 of the colliding objects.
OnCollisionEnter deals with "real" physics collision, meaning that they require a rigidbody.
– cdrandin