Falling through ground with colliders

Imported a FBX of a vehicle, made sure to tick Generate Colliders, and it's well above the terrain so it's not partially stuck inside it. Soon as I add a Rigid Body, it falls straight through immediately upon start no matter what I do. Tried adding different shaped collider meshes to it, cube, plane, sphere, the actual body of the model... nothing matters.

10 Answers

10

make sure you apply the collider's to each individual mesh. don't apply the colliders to the entire .fbx as a whole. just it's individual parts. also, try adding more than 1 mesh to collide. if 1 mesh isn't working, duplicate it for double protection.

This is the key. Thanks.

if that's the correct answer PLEASE "TICK" IT to help close out the question

It works for me! Thanks.

increase its y position so its not touching the ground

thanks this helped a lot

Can you take a look here on your Unity:

Edit->Project Settings->Physics->collisionmatrix

Exactly. Generate Colliders makes non-convex Mesh Colliders, which do not interact with terrain.

Generating colliders doesn’t interact with terrain. Therefore, the following link has a step by step process to solve your problems (tutorial for vehicle physics).

http://msfx.co.uk/clients/aston/2013/8/

Maybe your Terrain Collider is set as Trigger or is removed from the terrain?

In the rigidbody component, is gravity checked? that could be one reason it falls off.

I believe that you need to check “Convex” under the “Collider” component of the car.

This solved my problem with rigid body falling. Having 'convex' selected in the mesh collider causes the rigid body to interact with the terrain> Thanks :D

Add a mesh collider to both the car and the terrain. If that doesn’t work, add an empty gameobect around the car, give the gameobject a BOX collider, AND MESH collider. Then it should work. If not, give me a copy of the project and I’ll see if I can get it.

mesh collider > tick on “convex”

hope your problem solved
or try using “box collider” with “convex” ticked

cause :

  • too thin collider
  • using mesh is very-very useless if not using convex

tick the convex box on your car collider that’s what I do when I break windows :slight_smile: