Class
AngularVelocity
Applies torque on an assembly to maintain a constant angular velocity.
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#
AngularVelocityVector3 | A Vector3 that gives the desired or target angular velocity.ReadSafe |
MaxTorquefloat | Magnitude of the maximum torque the constraint can apply.ReadSafe |
ReactionTorqueEnabledboolean | Causes the constraint to apply equal and opposite reaction forces.ReadSafe |
RelativeToActuatorRelativeTo | The ActuatorRelativeTo value specifying the coordinate frame in
which the AngularVelocity vector
is expressed; defaults to World.ReadSafe |
AngularVelocity: Vector3#
ReadSafe
A Vector3 that gives the desired or target angular velocity.
This vector is set in the CFrame expressed by the
RelativeTo property.
MaxTorque: float#
ReadSafe
Magnitude of the maximum torque the constraint can apply.
ReactionTorqueEnabled: boolean#
ReadSafe
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 RelativeTo is set
to Attachment1.
RelativeTo: ActuatorRelativeTo#
ReadSafe
The coordinate frame in which the
AngularVelocity vector is
expressed, selected by an ActuatorRelativeTo value. If set to
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.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild