How to make ridgidBodies not go through the floor all the time!

hello, i have the really annoying situation where my ridgid body does nothing apart from go through the floor? i've tried everything, the only thing the ridgid body interacts with is another ridgid body. what to do?

If your floor is a surface (I.e. A plane or mesh with no thickness and your object is small in comparison to it's speed) then you may find making your floor a solid mesh will help. Ie if your floor is a plane then make it a box enclosing some volume or at least use a box collider. If your floor is a mesh then close your mesh to enclose some volume and use a mesh collider with that mesh.

Ps this is assuming you have added a collider to your floor and are having problems despite this.

It is unclear from your question whether your rigidbody falls through the floor always (as if the floor is not there) or only in some situations (like when it's moving fast).

If it happens always, are you sure you have a collider on the floor?

If it only happens sometimes, you can try to make the fixed time-step smaller under `Edit -> Project Settings -> Time`

If/when you use Unity 3 there is also a new collision mode that can prevent objects going trough each other without needing to make the physics time step smaller, though it comes at a little performance cost.

Decrease the fixed time step under Edit->ProjectSettings->Physics.

i had to restart all over agin. seems to be a glitch with loading the project. afterwards (now) i'm fine. just make sure to have a collider on the floor (not a mesh collider) and to have a collider and rigid body to your object you want to effect with gravity.

I found using a plane for my ground rather than a wide cubiod worked best. I guess the bug was something to do with the mesh collider.

Note that my method (intuitively) is

  • build rigid body objects on or just-above the plane
  • initalise all Rigidbodies above eh plane with gravity turned on
  • When a object’s trigger collider enters the plane, or whatever. Set it’s gravity off.
  • Turn the gravity on after a jump action, or anything like that