- Home /
Question by
JackBid · Feb 10, 2013 at 08:12 PM ·
collisiongameobject
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.
Comment
OnCollisionEnter deals with "real" physics collision, meaning that they require a rigidbody.
Answer by DeBunked · Feb 11, 2013 at 02:37 AM
As cdrandin said, add a Rigidbody to at least 1 of the colliding objects.