Documentation

Unity Engine

Download Unity

Unity Engine

Introduction to primitive collider shapes

Learn about the Box, Sphere, and Capsule primitive collider shapes, and when to use them.
Read time 1 minuteLast updated 15 days ago

Primitive colliders are the most computationally efficient shape of collider in Unity. They're called "primitive" because they're defined by simple geometric shapes such as boxes, spheres, and capsules. Each primitive collider matches one of the built-in Primitive Objects.
Primitive colliders are usually not the best option for complex objects, irregular shapes, wheels, or Terrain collision. For colliders with more complex collider shapes, refer to Mesh colliders, Terrain colliders, and Wheel colliders.

Types of primitive collider shapes

There are three primitive collider shapes in Unity:
  • Box collider: A rectangular box-shaped collider that's suitable for most rectangular objects.
  • Sphere collider: A spherical collider that's suitable for most circular objects.
  • Capsule collider: A cylindrical collider that's suitable for objects that have a cylindrical shape, or to round out the collision edges on sharp corners. Capsule colliders are also useful for player and non-player characters.

Limitations of primitive colliders

Primitive colliders are efficient, but they have limitations. For example, you can't change or deform their shape, only their scale. Primitive colliders, unlike mesh colliders, have fixed shapes and aren't made up of triangles.
Note that the Physics Debug window displays a triangle-based mesh on primitive colliders. However, this mesh is for visualization purposes only and doesn't reflect the collider’s construction. For more information, refer to Physics Debug window reference.
If you need a collider that fits a complex shape but doesn't require precise collision, use primitive colliders to create a compound collider. A compound collider combines multiple primitive colliders arranged to approximate the desired shape.

Additional resources