Garry's Mod Wiki

PhysObj:GetAngleVelocity

PhysObj:GetAngleVelocity

  Vector PhysObj:GetAngleVelocity()

Description

Gets the angular velocity of the object in degrees per second as a local vector. You can use dot product to read the magnitude from a specific axis.

Returns

1 Vector
The angular velocity

Example

Calculate the RPM of an object rotating around its local Z axis with one revolution per second.

print("RPM", oPhys:GetAngleVelocity():Dot( Vector(0, 0, 1) ) / 6)
Output: RPM 60

Special Pages


Wikis

?

Render Time: 20ms

DB GetPage 3
Generate Html 2
SaveChanges (1) 6
Render Body 0
Render Sidebar 7