Search code examples
unity-game-enginemesh-collider

Why Mesh Collider is not following 3D object's mesh exactly?


I am new to Unity and having trouble with 3D physics.

I imported a basic 3D "U" bar shape and applied Rigidbody and Mesh Collider. When I drop another object let's say a ball, it does not go into the shape. When I select the shape, I realized a green line between to edges of the U shape which seems like Unity recognizes it as rectangular object.

How I can make Mesh Collider the follow imported mesh's exact shape?

Thank you.

Shape: enter image description here Properties: enter image description here Mesh Collider: enter image description here


Solution

  • Your shape is not convex so if you check the convex option then Unity3d will modify collision shape to be convex. mesh collider not matching shape

    To fix that, try to uncheck the convex option.