Mesh colliders are unusable for background collision meshes.
UPDATE: In case anyone stumbles across this – this was a bug in Unity 2.6.1 which seems to have been fixed by Unity 3.3
In my game, for my backgrounds I have separated visual meshes and a lower-poly collision mesh. The floor of the world is made up of mesh colliders. Smaller collider+rigidbody objects regularly fall through the floor (slow moving) when impacting the collision mesh on a triangle edge (seam between 2 faces). I have objects fall through as large as radius = 0.3, height = 0.6 (capsuleCollider), whether they are BoxColliders or CapsuleColliders. Objects are falling using normal physics gravity set at -9.81. Objects may only fall a distance of 1 meter before hitting the ground, so object speed is not very fast, yet they still fall through.
*** Colliders do not fall through when collision occurs entirely on a polygon face
*** Colliders FALL THROUGH when collision occurs touching a triangle edge between polygons
Edit: The following image illustrates box 1 landing on the flat face of the triangle correctly and box 2 in the midst of falling through because it collided on the triangle edge.
I don’t understand this at all. Why would a triangle edge cause a collision to fail?
My collision meshes are made of relatively large flat polygons. Any time a small object collision happens on the flat face of a polygon, it does not fall through. Anytime any part of the small collider touches a polygon edge, the collision fails and the object falls through the floor.
This does not happen with BoxColliders. I tested a box collider as a floor and NEVER saw an object fall through, I assume because there are no polygon edges on the flat top face. However, I simply cannot use box colliders for my backgrounds and must make the mesh colliders work somehow.
My original floors were are all planar meshes of varying size. The testing meshCollider is about 85m X 50m (planar). I tested a v-extruded version (about 4m thick) thinking that maybe having a thickness to the collider would help, but the results are exactly the same.
It doesn’t vary with distance from world origin, so I can’t blame 32-bit float imprecision. (It even falls through almost exactly near 0, 0, 0).
FYI, Physics.minPenetrationForPenalty = 0.01
All items are built on realistic scale. Therefore a small item such as a gun, even with a somewhat oversized box collider, easily falls through the floor if it hits a triangle edge on the collision mesh.
PS: This is a repost with information sorted out better. My old post’s title didn’t accurately describe the problem and I got zero responses.