Open single-sided box not colliding

I’m just getting started in Unity, so I’m curious about a few things.

In the AngryBots demo, there are a number of simple crates (crateSmall) that have box colliders attached to them. However, when I attach a Rigidbody, they fall through the floor. I noticed that the crates didn’t have a bottom face, so I created a copy of the FBX, added in the two polygons for the missing face, textured it, imported this new model (call it ‘box’), and it behaves correctly when attached with a box collider and rigidbody.

Is this expected behavior?

In addition, while the player character collides with crateSmalls and other static objects, the box object I created moves right through them, as do the enemy bots. Is this also expected behavior?

Finally, still in the AngryBots demo, why do the player and box objects (rigidbody colliders) NOT fall through the floor, despite the floor pieces not having colliders attached?

There are several solutions to this.

My first would be to make sure your ground or floor is not a plane. Planes are notorious in game engines for having collision detection issues. So make your floor a cube with a box collider, then just size it appropriately, but keep the floor quite thick.

If you still have problems, I’d suggest increasing the scale of your world and the objects in it. I’ve done this and while it sounds strange it actually does make a difference. So increase the scale of your world * 10.

Thirdly, a useful script you can attach to fast moving rigidbodies is the DontGoThroughThings script on the community wiki.

I got it! It was an issue with layer-based collision detection. My new box was being imported into the Default layer, while the crateSmalls were set to the Reflection layer, but hte two weren’t set to interact with each other.