Zum Hauptinhalt springen

Collider

ecs.Collider

Description

The Collider component defines the physics collision behavior of an entity.

Functions

See component schema.

Schema

PropertyTypeDefaultDescription
shapeNumberSee ColliderShape
widthNumberX Size, used by Box and Plane
heightNumberY Size, used by Box, Plane, Capsule, Cone, and Cylinder
depthNumberZ Size, used by Box
radiusNumberUsed by Sphere, Capsule, Cone, Cylinder
massNumber0Leave 0 to make static.
eventOnlyBooleanfalseWhen enabled, the object will pass through other objects but still dispatch collision events.
lockXAxisBooleanfalseDisables rotation on the X axis.
lockYAxisBooleanfalseDisables rotation on the Y axis.
lockZAxisBooleanfalseDisables rotation on the Z axis.
frictionNumber0.5Simulate contact friction.
restitutionNumber0Controls the bounciness of the object.
linearDampingNumber0Simulate air friction while moving.
angularDampingNumber0Simulate air friction while rotating.
rollingFrictionNumber0Simulate friction on rolling surfaces.
spinningFrictionNumber0Simulate friction on surfaces twisting against each other.
gravityFactorNumber1.0A factor of world gravity