Unity Physics — Using Mesh Colliders

Sean Duggan
2 min readMay 24, 2024

--

Mesh Colliders are a possible solution with very complex objects. Essentially, instead of trying to approximate the shape of the complex object with multiple primitive colliders, you tell the engine to treat every face of the mesh as a collider, and to handle things from there. As you can imagine, that can make the physics calculations considerably more complicated. So, why use Mesh Colliders?

First off, they’re easy. Need a collider on an object that is a mesh? Pop on a Mesh Collider and it just works. I’ve done that a few times simply so that I can test things out without having to figure out a decent matching set of primitive colliders. Secondly, they’re very accurate. Take the common American football.

In a pinch, a capsule collider could work quite nicely if all you need the ball to do is to land in a balanced position after dropping. But what if you want it to actually fall and bounce like the real thing, i.e. rocking, and bouncing in odd directions when it lands on its points? Then, it may be much easier to use the Mesh Collider. Similarly, there are a number of simple geometric shapes like ramps that are harder to emulate with primitive colliders, but which are very simple to emulate cheaply with a Mesh Collider. Third, for situations where you need specific geometry matching the mesh, and it’s a static object that generally doesn’t need a ton of physics processing (say, part of the scenery), a Mesh Collider is pretty inexpensive.

So, long story short, there are some lazy reasons to use a Mesh Collider, but there are also some very good ones.

--

--