Collider components
Add Collider components to your GameObjects to give them boundaries for collisions and interactions.
Read time 1 minuteLast updated 2 days ago
Use colliders to define which parts of an object respond to physical interactions and to detect collisions, clicks, or touches. You can also add multiple colliders to a single GameObject to represent complex shapes.
Collider types
Collider components come in different shapes to fit your objects. Choose the one that best matches your object's shape for accurate interactions.A Box Collider is a physics collider shaped like a rectangular box (cube or cuboid). Use this collider on straight-edged objects that need to detect or respond to collisions. For example, boxes, walls, and platforms. You can adjust its size and center to fit your mesh.
Property | Description |
|---|---|
| Use as Trigger | Enable to let other objects pass through this object without collision, but still fire events when the objects overlap. Disable to make the object unable to pass through. |
| Center | Define the center of the object where the collider starts from. |
| Size | Change the size of the collider. |
A Sphere Collider is a physics collider shaped like a sphere. Use this collider for spherical or round objects that need to detect or respond to collisions.
Property | Description |
|---|---|
| Use as Trigger | Enable to allow other objects to overlap with this object, which means no physical collisions take place. The collider can still fire events when it detects another object. Disable to keep the object able to collide with others. |
| Center | Define the center of the object where the collider starts from. |
| Radius | Change the size of the collider. |
A Capsule Collider is a physics collider shaped like a capsule. Use this collider on cylindrical objects that need to detect or respond to collisions. You can adjust its size and center to fit your mesh.
Property | Description |
|---|---|
| Use as Trigger | Enable to let other objects pass through this object without collision, but still fire events when the objects overlap. Disable to make the object unable to pass through. |
| Center | Define the center of the object where the collider starts from. |
| Direction | Change which direction the collider scales in. |
| Radius | Set the collider's size around its center. |
| Height | The height of the collider. |
A Mesh Collider is a collider that follows the exact shape of a 3D model for precise collisions. Use this collider type for complex or irregular objects where simpler colliders (box, sphere, capsule) don't fit well. Mesh Colliders are more accurate but can be more intensive than other colliders, so it might sometimes be more efficient to use or combine other collider types.
Property | Description |
|---|---|
| Convex | Define the center of the object where the collider starts from. |
| Is Trigger | Enable to make the object able to pass through, but can fire events when it detects another object. Disable to keep the object collidable. |