PhysObj.AddAngleVelocity

From GMod Wiki

Jump to: navigation, search
Function
Syntax PhysObj:AddAngleVelocity( Vector velocity )
Description:
Adds angular velocity to an object, making it spin.
Returns: nil
In Object: Physobj
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=PhysObj.AddAngleVelocity]PhysObj.AddAngleVelocity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionThis example makes all prop_physics spin like crazy on the yaw axis.
Used onNewerServer.png
Code
local props = ents.FindByClass( "prop_physics" )
for k,prop in pairs(props) do
  prop:GetPhysicsObject():AddAngleVelocity(Vector(0,10000,0))
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox