It answers a simple question: what part of this object can touch, block, overlap, or be queried?
Why Colliders Exist
Artwork is not a reliable collision shape.
A sprite might have transparent pixels, soft edges, or a pose that changes during animation. A model might be visually complex. Physics needs a simpler shape it can test quickly and predictably.
That is what a Collider provides.
Common Collider Shapes
Common collider shapes include:
- boxes for platforms, walls, crates, and simple characters
- circles for balls, pickups, sensors, and radial effects
- 3D boxes, spheres, and capsules for 3D objects
Choose the shape that matches the gameplay need, not necessarily the exact artwork.
Collider and Rigidbody
A Collider defines shape.
A Rigidbody defines physics movement.
They often work together.
For example, a moving player might have a Rigidbody2D and a BoxCollider2D. The Rigidbody handles motion, while the BoxCollider2D defines the player's collision shape.
Static level geometry may only need colliders if it does not move.
Solid Colliders and Triggers
Some colliders are solid.
Solid colliders can block or physically interact with other colliders.
Some colliders are triggers.
Triggers detect overlap without acting like a wall. They are useful for pickup zones, damage zones, checkpoints, area entrances, and invisible sensors.