# Unable to have a character inside a moving room.

Hello fellow Programmers!
I’m currently trying to program a realistic simulation of a character inside a rocket, but I’m not super familiar with programming yet. I’ve messed around with Rigidbodies and Colliders, as well as Addforce and Transform.translate. Here’s what’s happening: I have a capsule inside a room I made in Blender. It has a box collider, and it’s gravity is controlled by Transform.translate. The room has a mesh collider and a rigidbody attached to I can control it with AddRelativeForce. This lets me simulate the effects of control in space. The problem is that when I play the game, the player passes through the floor, and I get an “Rigidbody not compatable with non-convex mesh collider component” error. So I set the mesh collider to “Convex”. Then when I play it spits the character out of the ship as if it was a solid. I have no Idea how to fix it. Any Ideas?

Since your room is probably hollow, it’s most certainly non-convex. If you set the mesh collider to “convex”, physx calculates the convex hull of your shape, which is certainly not hollow and thus spits out your character like it should for a solid object.

On convexity: it’s a very important concept for (computational) math which lets you speed up many calculations based on assumptions that can only be made for convex shapes. The simplest explanation that I can come up to show what they look like is as follows: imagine any shape and stuff it into a nice big rubber balloon. Now slowly let the air out of the balloon so that it encloses your shape. If the skin of the balloon touches your shape in every point of the surface of your shape, it’s convex. If not, for example because your shape as a dent in it, the shape that the balloon has now is called the “convex hull”.

The advice to make it work is to break your complex, non-convex shape down to convex parts, also called a convex decomposition. This is most easily to be achieved by removing your meshcollider and replacing it by the standard colliders: spheres, capsules and boxes.

I hope I could help!