Collision meshes: what they are and how to make one

Game Development

A collision mesh is the simple shape a physics engine tests instead of the model you see. Which collider to use, and how to build one in each engine.

A collision mesh (or collider) is the simplified shape a physics engine uses for an object instead of the model you see — a box, a capsule, a few convex hulls. The mesh a player sees and the shape they collide with are different objects, deliberately. Using the render mesh for physics is the single most common cause of a game that runs fine visually and stutters under load.

Why they differ

Collision detection cost scales with complexity, and it runs many times per frame against many objects. A 60,000-triangle prop as a collider is 60,000 triangles the physics engine tests against; a box approximating it is six faces.

The collider hierarchy, cheapest first

  • Sphere. Trivial to test. Right for balls, pickups, rough proximity.
  • Capsule. Cheap and stable. The standard character collider.
  • Box. Cheap. Right for crates, walls, most architecture.
  • Convex hull. Moderate. A shrink-wrapped shape with no concavities — right for most props.
  • Compound convex. Several hulls approximating a concave object. The usual answer for anything with a hole or a hollow.
  • Triangle mesh. Expensive, and usually restricted to static geometry. Right for terrain and level shells.

The concavity rule

Most physics engines cannot use a concave shape as a dynamic collider. A bowl, a doorway, a ring — each has to be decomposed into several convex pieces or treated as static. If a dynamic object behaves as though it is solid where it should be hollow, this is why.

Generated meshes as colliders

Dense, irregular, and often with small non-manifold artefacts — the worst possible input to a physics engine. Always author collision separately, either by hand from primitives or with an automatic convex decomposition, and never by ticking the box that reuses the render mesh.

Making one in each engine

  • Unity: add a Box, Sphere or Capsule Collider to the object. A Mesh Collider takes a shape directly; tick Convex for anything that moves.
  • Unreal Engine: in the Static Mesh Editor, the Collision menu adds box, sphere and capsule colliders or runs Auto Convex Collision. A custom collider can come in with the FBX as a mesh whose name starts with UCX_.
  • Godot: select the mesh, open the Mesh menu and choose Create Collision Shape — single convex, multiple convex or trimesh.

A Gaussian splat world exports a collider mesh beside the visual one for exactly this reason: the splat is for looking at, and physics needs a surface.

A useful discipline

Collision should usually be slightly smaller than the visual mesh, not larger. A player who visibly clips a wall corner forgives it; a player blocked by nothing does not.

Last reviewed