Rigidbody objects not colliding.

I have a scene using some barrels that have Rigidbody colliders on them. The player can then walk up and collide and move the barrels around.

My problem now is that my barrels won’t collide with one another.

I am using a Mesh Collider (With a custom simplified Cyclinder mesh for collision) and Rigidbody collider on the barrels.

I have discovered that if I use a Box Collider instead of a Mesh one, the barrels collide like normal.

Any help would be greatly appreciated!

Standard mesh colliders can’t collide with other standard mesh colliders. Only convex mesh colliders can collide with each other. For performance reasons, compound primitive colliders should be used where possible. A capsule/box combo generally works well for barrels (capsule for rolling, box so they stand on end).

There 2 things

  1. Rigid body
  2. Mesh Collider

If you have 2 different bodies and both of them are not colliding for some reason then please make sure that they both have the above two properties

Both should be rigid bodies and both must have their meshes.

Example.
BodyA is like a box and has Box Collider attached with it, It must be a rigid body attached with it as well
BodyB is a sphere and has a Sphere Collider attached with it, It must be a rigid body as well.
Both bodies must have their isKinematic checkbox UNCHECKED in order to fall with gravity checkbox checked.

Both bodies will collide if the above mentioned procedures are followed correctly

Sometimes, an object wont collide with another object because you have a public property like a sound or something like that that’s not assigned.

If it’s not assigned, then any code after trying to play the sound, or using the missing object in some way wont get run!

From the experience of my current project, I set the collision detection mode of rigidbody to be Continuous, then the rigidbody does not fall through the mesh collider of a complex object underneath.