RigidBodys Collision

Hi, Everybody!

Let me ask somthing function OnCollisionEnter() works for rigidbodys collision detection ? Cause i’m trying to detect collisions between two rigidbodys but its not working.

Let me ask another question too, is it possible to Destroy an GameObject with rigidbody attached? Function destroy is not working.

Please Help me, i need a spotlight!

Thanks!

How are you trying to destroy the object? This is working for me:

GameObject.Destroy(gameObject);

You don’t say what you’re trying to collide what with what. Some mesh collisions between Rigidbodies only works if one is set as Convex.

You may want to set up a boolean variable like: “inCollider” and set it to true on collision.

then put print(inCollider) in update() to check if your actually getting a connection - you’ll see the var state in the bottom left or in the log.