- Home /
Mesh collider not detecting ground
Why mesh colliders in Unity 5 does not always detect collision with ground?
Sample setup: A plane, a mesh with Rigidbody and collider (mesh, box or capsule) not set to be a trigger, and positioned at some height. If height is greater than 1 meter, the object falls through the plane, but if height is less than a meter, sometimes it falls and sometimes it doesn't. Same setup works 100% in Unity 4. Using a 1 meter thick cube as ground solves the issue, but doesn't seem optimal as 5 faces of the cube will remain unseen by the player... This also means that you'll have to replace all planes with solids (walls, doors, windows and maybe even other GameObjects) just to ensure things don't get teleported.
Have you made the $$anonymous$$eshCollider convex?
Same thing happened to me but that fixed it
Answer by Animatics_3D · Jun 03, 2015 at 05:20 AM
follow these steps.
1.if you are not making plane as rigid body only using mesh collide then give some thickness to plane to avoid this problems its work fine.
2.if you are using mesh collide and rigid body on plane then you don't need to give thickness Just keep on both the option(Use Gravity,and Is Kinematic) to avoid collision problems.
but I have also check this in maya created plane and apply mesh collide in unity 5.collision is working fine without any problems. but you can use above option to solve this problems .
Thank you, but did you read the part that says "not always"? That implies that ground is checked sometimes and sometimes it doesn't using the same scene.
I'm using a script to spawn loot items randomly and to avoid being instantiated within unaccesible zones, the items are dropped from above the environment. Now, for instance, some water bottles fall through the plane whereas others get to the ground correctly. Since I'm using prefabs to instantiate the loot items, it seems like a Unity 5 bug that some instances of a given prefab fall down through the plane while others don't.
Your answer
Follow this Question
Related Questions
Player movement not working with unity 5 1 Answer
Problem with jumping in fps game 1 Answer
How to drag object faster to the ground? 3 Answers
Export Animations From Unity3D into Blender? 1 Answer
how to make a gameobject rigid? 1 Answer