The Collision component assigns a collision volume to the entity. The component interface dynamically displays different attributes based on the 'Type' attribute.
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.
If the entity also has a rigidbody component, the collision component determines the shape of the rigid body. If no rigidbody 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 rigidbody component enters or exits the trigger, your script can be notified.
|Type||The type of collision primitive. Can be:|
|Half Extents||Box only. The half-extents of the collision box. This is a 3-dimensional vector: local space half-width, half-height, and half-depth.|
|Axis||Capsule only. Aligns the capsule with the local-space X, Y or Z axis of the entity.|
|Height||Capsule only. The tip-to-tip height of the capsule.|
|Radius||Sphere and Capsule only. The radius of the sphere or capsule body.|
|Asset||Mesh only. The model asset that will be used as a source for the triangle-based collision mesh.|