Simple collision not working

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.

OnCollisionEnter deals with "real" physics collision, meaning that they require a rigidbody.

1 Answer

1

As cdrandin said, add a Rigidbody to at least 1 of the colliding objects.