PhysObj.ApplyForceCenter
From GMod Wiki
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.