- Home /
Why is my mesh collider not the same shape as the mesh of the object?
I made a model in Blender and imported it to unity. I want the object to be collide-able and be a part of the world. But when I add a mesh collider it covers the whole thing including empty space that I want the player to be able to walk through.
Is there a way to make the collider confine to the walls instead of the whole area? I guess if I made the two walls separate objects it might solve it, but is there a way to make the collider automatically do what I want without that?
$$anonymous$$aking them into two objects didn't solve it. Again, is there a way to fix this?
Answer by Bunny83 · Oct 08, 2017 at 05:58 PM
It looks like you checked the "convex" checkbox. If that checkbox is checked Unity will calculate the convex hull of the object which is exactly what you see here. The convex hull of course can't have any concave sections (as it wouldn't be convex in that case).
So just uncheck the convex checkbox of your collider.
Convex mesh collider are only needed on moving rigidbodies. If this is a rigidbody you shouldn't use a mesh collider but instead approximate the shape with several primitive colliders. See compound colliders on this page