Collider component
The Collider component defines the shape of an entity for collision detection purposes.
A Collider component requires a Rigidbody component on the same entity or one of its parent entities.
Property | Description |
---|---|
Shape | Specifies the shape of the collider. Options include Box, Sphere, Capsule, Cylinder, Mesh, and others. |
Mass | Defines the mass of the entity, affecting how it responds to forces and collisions. |
Mass Center | Adjusts the center of mass for the collider, influencing its rotational behavior when forces are applied. |
Friction | Determines how the entity interacts with surfaces, affecting sliding and resistance. |
Restitution | Controls the bounciness of the entity when it collides with other objects. |
Collision Layer | Assigns the collider to specific layers, determining what it can collide with. (Note: Currently, configuring layers may be complex and is not recommended without advanced knowledge.) |
Collision Mask | Defines which layers the collider will interact with. (Note: Similar to collision layer, this is advanced and may be difficult to configure.) |
- Mesh collider: When using the Mesh shape, you must have a Mesh component on the entity, typically from a GLTF model.
- The Collider shape should match the physical shape of your entity for accurate collision detection.
- Currently, collision layers and masks are advanced features and may not be user-friendly. It's recommended to use default settings unless you have specific requirements.