Garry's Mod Wiki

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