Using colliders with open crates, containers and boxes for user dropping objects into

Hi.

I’ve got a few crates and boxes and the user drops objects into the crates.
Modelling and texturing a crate without a “top” on it is simple enough.
However, the box collider doesn’t recognise that the top of the crate is missing.
I tried using a mesh collider without convex turned on but that didn’t work either.
I ended up just importing one side of the crate into Unity, applying a box collider to that one side, and then assembling a crate in Unity - this way only the sides and bottom of the crate had a box collider around them and the internal volume of the crate was empty. But that seems like a bad workflow.

Looking for suggestions how you might drop an object into a crate, container, box, etc.

Thx

Hey!

The box collider does not depend on the mesh it is attached to. It is always going to be a convex box shape, so that is by design.

Could you elaborate on this?

Keep in mind that Non-Kinematic rigid bodies with non-convex mesh colliders are not supported. So you should be able to have something fall into the box, but if you want the box to have a rigidbody and be able to move around, then you’ll need to find a specific solution.

For simple shapes like a box, you arrived at a good solution yourself. Just use primitives(in this case simple box colliders) on each wall of the box and you can have a physics interactive concave box without a huge performance impact.

2 Likes