PhysObj.ApplyForceOffset
From GMod Wiki
Revision as of 00:43, 24 October 2009 by Unrealomega (Talk | contribs)
Function | |
Syntax | PhysObj.ApplyForceOffset( Vector force, Vector position ) |
Description: | |
Applies a force to an object on the given position, so it also adds torque | |
Returns: | nil |
In Object: | Physobj |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=PhysObj.ApplyForceOffset]PhysObj.ApplyForceOffset [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
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.
- Also keep in mind, if you want said force to cause the same acceleration on all objects, use the mass in the equation. (F=m*a)