Component reference
Physics components

Collider component

4min

Description

The Collider component defines the shape of an entity for collision detection purposes.

Document image



Requirements

A Collider component requires a Rigidbody component on the same entity or one of its parent entities.

Properties

Property

Description

Shape

Specifies the shape of the collider. Options include Box, Sphere, Capsule, Cylinder, and Mesh.

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 only recommended with 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.)

Usage notes

  • 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.
  • Collision layers and collision masks are advanced features. It's recommended to use default settings unless you have specific requirements.