I created a pig in 3DS max and exported it as a .3ds file. I then imported it to Unity and brought into my scene from the assets menu.
Everything was going smoothly(for once) and I applied a rigid body to the mesh as a whole. Whenever i press play it falls through the terrain. I have Generate colliders toggled ‘ON’ and have tried applying primitives to all parts of the mesh, and using a standard mesh collider. Nothing seems to work. I’m very new to Unity, having less than 2 hours of experience with the software. I’m not using the pro version or any extra features.
Can anyone explain in depth how I can fix this? Please be as specific as possible when answering as I am very, VERY new with Unity.
Thanks in advance.
set you mesh collider to convex, you will see it in the inspector panel by the right-hand side
and also check if one of the components(rigidbody, collider or terrain) is set to isTrigger, it is also in the panel
As @duclaw said, a mesh collider must have Convex set, or it will fall through the Unity terrain. If you still have problems with your mesh, use a sphere, capsule or box collider instead: select the pig and click menu Component/Physics/Box Collider (or Sphere, or Capsule), then answer Replace to the question “Replace existing component?”.
If you could add a picture of the inspector when you click on your model it would help greatly. These are just 2 of the possible solutions. In the inspector, right next to the colliders name there is a check box. Make sure its on. Now the first option on collider is “Is Trigger”. If “Is Trigger” is on then it will ignore collisions so it would cause your collider to fall through the floor. In other words you want “Is Trigger” set to false.