PhysObj.ApplyForceCenter

From GMod Wiki

Jump to: navigation, search
Function
Syntax PhysObj:ApplyForceCenter( Vector force )
Description:
Applies a force to an object, but without any torque.
Returns: nil
In Object: PhysObj
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=PhysObj.ApplyForceCenter]PhysObj.ApplyForceCenter [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis example makes all prop_physics shoot up a ways.
Used onNewerServer.png
Code
local props = ents.FindByClass( "prop_physics" )
for _, prop in ipairs( props ) do
  prop:GetPhysicsObject():ApplyForceCenter( Vector( 0, 0, 900 ) )
end
OutputN/A

Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox