- Home /
Why does this MeshCollider think it's half as thick?
As you can see in the image, the object (a rigidbody) sits halfway through the floor. This happens on both sides. It's set to Convex. The mesh was created in Blender. Any ideas?
How large is the mesh in question? Is this a problem with penetration depth in your physics settings? Also, check your normals. Could the mesh in question be inside-out?
syclamoth, I wanna give you a big old checkmark. Post as an answer :)
Answer by judgementAlex · Sep 09, 2013 at 06:16 AM
An interesting effect of using the "Scale Factor" on model import, it doesn't affect penetration depth for MeshColliders. The engine thought my model was twice its actual size. I've adjusted the pen depth for now, but I'll have to go and scale down all my models to use Scale Factor = 1.
Thanks syclamoth
Well, my answer was technically correct but for a totally different reason! I didn't know about that- I usually try to keep import scale at exactly 1 in general to avoid confusion in the asset pipeline so I've never come across this before. Props for figuring out the solution anyway.
Answer by Indiegangster · Sep 09, 2013 at 05:53 AM
I'm pretty sure since its convex : Convex If enabled, this Mesh Collider will collide with other Mesh Colliders. Convex Mesh Colliders are limited to 255 triangles.
Is there a special need to have this convex ... ?
Well, if it's not flagged as convex it falls through the terrain. If convex is disabled and I have it sit on another rigidbody it still sits as pictured above.
Weird I wonder if this is due to rigibody or the convex I know when I would generate my voxel terrain and try things with convex it would built the mesh completely horrible to narrow down beause the triangles.... so im wondering if it was that however are you sure that the floor its colliding with it's mesh collide r is at proper height as well?
Never $$anonymous$$d I just noticed the above post I dont regulary work with mesh collide-rs the same ..... $$anonymous$$inda strange hope this gets updated further in ...