PhysObj.GetAngleVelocity

From GMod Wiki

Jump to: navigation, search
Function
Syntax PhysObj:GetAngleVelocity( )
Description:
Gets the angular velocity of a physics object.
Returns: Vector
In Object: Physobj
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=PhysObj.GetAngleVelocity]PhysObj.GetAngleVelocity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]




Example

DescriptionLets you know if the object is being rotated or not.
Used onNewerServer.png
Code
 
local phys = self:GetPhysicsObject()
 
//always do a isvalid check!!
if phys:IsValid() then
	if phys:GetAngleVelocity():Length() > 0 then
		//is being rotated
	else
		//not being rotated
	end
end
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox