OnCollisionEnter not reporting a collision

…so I have a non-kinemtic rigidbody that I want to collide with a box collider. I’m using OnCollisionEnter() to test for the collision, but no collision is being reported. Any ideas?
Thanks!

Both of them need to have rigidbodies attached. The wording on the scripting reference is a little misleading:
“OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.”

“Note that collision events are only sent if one of the colliders also has a non-kinematic rigidbody attached.”

They both need to be rigidbodies, but at least one of them has to be non-kinematic.

That is very misleading - they both need to be…wow, isn’t that very expensive?

Wait a second, I might be wrong. Were you trying to run OnCollisionEnter() in a script on the rigidbody, or the box collider sans rigidbody?

Both objects had box colliders, only one object had a rigidbody (as the docs implied). If it makes any difference, the object with the rigidbody also had a configurable joint to prevent rotation in a certain axis (thats the only reason it had the rigidbody)

But which object had a script that you were trying to do OnCollisionEnter()?

Ah right sorry - the non-kinematic rigidbody object.

Right I have the following in my scene now:

  1. Box colliders around the perimeter of the scene
  2. Rigibodies on cubes. These move around and collide with the perimeter box colliders. All is well!
  3. I have a box collider that I’m moving via scripts. These colide with the rigidbodies, but not the box colliders around the perimeter. I really don’t understand why.

Any ideas? Is there any better documentation about colliders and when/when not to use them?
Thanks