Skip to main content

Function: addAngularVelocityMotorComponent()

addAngularVelocityMotorComponent(world, entity, options): AngularVelocityMotorEcsComponent

Defined in: physics/components/angular-velocity-motor-component.ts:41

Attaches an AngularVelocityMotorEcsComponent to entity.

Parameters

world

EcsWorld

The ECS world entity belongs to.

entity

number

The entity to attach the component to.

options

AngularVelocityMotorEcsComponent

Options for configuring the motor. Neither targetVelocity nor maxTorque has a sensible default and both must always be provided.

Returns

AngularVelocityMotorEcsComponent

The attached component, for further tuning or runtime changes.