Reference API Roblox

Engine API

Website

Related

Reference API Roblox

AngularVelocity

Applies torque on an assembly to maintain a constant angular velocity.

Member index 4

HistoryMember
553AngularVelocity: Vector3
553MaxTorque: float
553ReactionTorqueEnabled: bool
553RelativeTo: ActuatorRelativeTo
inherited from Constraint
553Active: bool
553Attachment0: Attachment
553Attachment1: Attachment
553Color: BrickColor
553Enabled: bool
553Visible: bool
604GetDebugAppliedForce(bodyId: int): Vector3
604GetDebugAppliedTorque(bodyId: int): Vector3
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
486GetChildren(): Objects
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
553children(): Objects
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
553getChildren(): Objects
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
647isA(className: string): bool
647Changed(property: string)

Description

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 Torque constraint.
  • If you only need initial angular velocity, set the AssemblyAngularVelocity method 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.

History 22

Members 4

AngularVelocity

TypeDefault
Vector30, 0, 0

A Vector3 that gives the desired or target angular velocity. This vector is set in the CFrame expressed by the RelativeTo property.

History 4

MaxTorque

TypeDefault
float0

Magnitude of the maximum torque the constraint can apply.

History 4

ReactionTorqueEnabled

TypeDefault
boolfalse

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.

History 6

RelativeTo

TypeDefault
ActuatorRelativeToWorld

The CFrame in which the AngularVelocity force is specified. 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.

History 4

Settings