Skip to main content

Collision

The Collision Component assigns a collision volume to the entity. The component interface dynamically displays different attributes based on the 'Type' attribute.

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 no Rigid Body Component is present, the Collision Component is treated as a trigger volume. The trigger volume cannot affect the simulation of other rigid bodies in the scene. Instead, you can add a Script Component and attach a script which responds to trigger events. For example, if another entity that has a Rigid Body Component enters or exits the trigger, your script can be notified.

Properties

PropertyDescription
TypeThe type of collision primitive. Can be: Box, Sphere, Capsule, Cylinder, Cone, Mesh, or Compound.
Half ExtentsBox only. The half-extents of the collision box. This is a 3-dimensional vector: local space half-width, half-height, and half-depth.
RadiusSphere, Capsule, Cylinder, and Cone only. The radius of the collision shape.
HeightCapsule, Cylinder, and Cone only. The height of the collision shape along the selected axis.
AxisCapsule, Cylinder, and Cone only. Aligns the collision shape with the local-space X, Y, or Z axis of the entity.
Convex HullMesh only. If enabled, the collision mesh will be treated as a convex hull, which is more efficient for dynamic rigid bodies. If disabled, the mesh is used as a triangle mesh (concave), which only works with static or kinematic rigid bodies.
Model AssetMesh only. The model asset that will be used as a source for the collision mesh. Either a Model Asset or Render Asset can be specified, but not both.
Render AssetMesh only. The render asset that will be used as a source for the collision mesh. Either a Model Asset or Render Asset can be specified, but not both.
Position OffsetThe positional offset of the collision shape relative to the entity's position.
Rotation OffsetThe rotational offset of the collision shape relative to the entity's rotation, specified in degrees.

See Also

Scripting Interface

You can control a Collision Component's properties using a Script Component. The Collision Component's scripting interface is here.