PhysObj.ApplyForceCenter
From GMod Wiki
Revision as of 12:29, 16 October 2009 by Unrealomega (Talk | contribs)
Function | |
Syntax | PhysObj:ApplyForceCenter( Vector force ) |
Description: | |
Applies a force to an object, but without any torque. | |
Returns: | nil |
In Object: | PhysObj |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=PhysObj.ApplyForceCenter]PhysObj.ApplyForceCenter [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- This will only work on objects of movetype MOVETYPE_VPHYSICS (See Entity.GetMoveType). Use Entity.SetVelocity instead.
- Will not work on players, since they have MOVETYPE_WALK.
- If you want to apply torque as well, look at PhysObj.ApplyForceOffset.
- Also keep in mind, if you want said force to be the same on all objects, use the mass in the equation.