Class · inherits Constraint
AngularVelocity
Applies torque on an assembly to maintain a constant angular velocity.
About AngularVelocity
The AngularVelocity constraint applies torque on an assembly to maintain a
constant angular velocity. Alternatively:
- If you want to control the amount of torque applied, use a
Torqueconstraint. - If you only need initial angular velocity, set the
AssemblyAngularVelocitymethod directly on the assembly.
When configuring this constraint, it may be helpful to study Roblox Units to understand how Roblox units compare to metric units.
Relativity
Application of velocity can be controlled through the constraint's
RelativeTo property. If set to
World, the angular velocity vector is used as is. If
set to Attachment1 and the constraint's
Attachment1 property is set to another
attachment, the angular velocity will be affected by that of the other
attachment. Setting RelativeTo to
Attachment1 also exposes the
ReactionTorqueEnabled property.
Properties 4
AngularVelocity
: Vector3AVector3that gives the desired or target angular velocity.A
Vector3that gives the desired or target angular velocity. This vector is set in theCFrameexpressed by theRelativeToproperty.MaxTorque
: floatMagnitude of the maximum torque the constraint can apply.ReactionTorqueEnabled
: booleanCauses the constraint to apply equal and opposite reaction forces.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.
Only meaningful when
RelativeTois set toAttachment1.RelativeTo
: ActuatorRelativeToTheActuatorRelativeTovalue specifying the coordinate frame in which theAngularVelocityvector is expressed; defaults toWorld.The coordinate frame in which the
AngularVelocityvector is expressed, selected by anActuatorRelativeTovalue. If set toWorld, the angular velocity vector is used as is. If set toAttachment1, the angular velocity is transformed by theCFrameof the assigned attachment.RelativeTocan also be set toAttachment0, but it makes no physical sense and will lead to unpredictable behaviors.
AngularVelocity also has every member of Constraint. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.