Skip to main content

Collision

The collision component assigns a collision volume to an entity. The component interface dynamically displays different properties based on the 'Type' property.

The Collision component can be enabled or disabled using the toggle in the top right of the component panel. If enabled and if the component is a trigger volume (because it has no sibling rigidbody component), the trigger volume will be enabled. Likewise, if the component does have a sibling rigidbody component, the rigidbody will be enabled.

Box

Collision component (Box)

Capsule

Collision component (Capsule)

Compound

Collision component (Compound)

Cone

Collision component (Cone)

Cylinder

Collision component (Cylinder)

Mesh

Collision component (Mesh)

Sphere

Collision component (Sphere)

If the entity also has a rigid body component, the collision component determines the shape of the rigid body. If there's no rigid body component, the collision component is treated as a trigger volume. Trigger volumes cannot affect other rigid body simulations in the scene. Instead, you can add a script component and connect a script that responds to trigger events. For example, you can receive notifications in the script when other entities with rigid body components enter or exit the trigger.

Properties

PropertyDescription
TypeThe type of collision primitive. Can be one of:
  • Box
  • Sphere
  • Capsule
  • Mesh
Half ExtentsBox only. The radius of the collision box. This is a 3D vector: local space half-width, half-height, half-depth.
AxisCapsule only. Aligns the capsule to the entity's local space X, Y, or Z axis.
HeightCapsule only. The height from end to end of the capsule.
RadiusSphere and capsule only. The radius of the sphere or capsule body.
AssetMesh only. The render asset or model asset to be used as the source for the triangle-based collision mesh.

Scripting Interface

You can control the collision component's properties using a script component. The collision component's scripting interface is here.