AngularVelocity

Show Deprecated

AngularVelocity is an object that applies a torque (up to MaxTorque) on a BasePart such that the part maintains a constant AngularVelocity. The goal angular velocity defined using world- or attachment-space coordinates by setting RelativeTo.

This object maintains all functionality of BodyAngularVelocity, a legacy body mover. To instead apply a constant torque, use a Torque object instead. To instead apply a torque such that a constant orientation is maintained, use a AlignOrientation instead.

Summary

Properties

A Vector3 that gives the desired or target angular velocity.

Magnitude of the maximum torque the constraint can apply.

Causes the constraint to apply equal and opposite reaction forces.

Events

Methods

Properties

AngularVelocity

A Vector3 that gives the desired or target angular velocity. This vector is set in the CFrame expressed by the AngularVelocity.RelativeTo property. Defaults to (0, 0, 0).

MaxTorque

Magnitude of the maximum torque the constraint can apply. Defaults to 0.

ReactionTorqueEnabled

This property, when enabled, causes the constraint to apply equal and opposite reaction forces. This is important if the two attached parts can collide, since without reaction forces collisions can create energy that would otherwise be disregarded.

When enabled, the reaction forces cause the constraint to act like an angular motor between the two attachments.

It is only meaningful and visible in studio when AngularVelocity.RelativeTo is set to Attachment1.

The CFrame in which the AngularVelocity force is specified. If set to Enum.ActuatorRelativeToWorld|World, the angular velocity vector is used as is. If set to Attachment1, the angular velocity is transformed by the CFrame of the assigned attachment.

RelativeTo can also be set to Attachment0, but it makes no physical sense and will lead to unpredictable behaviors. There will be a warning in Studio but the API will not prevent setting this value.

Events

Methods