![]() |
GearBlocks
The GearBlocks Lua scripting API
|
A physical entity. More...
Public Member Functions | |
void | ApplyForce (Vector3Proxy force, Vector3Proxy position, ForceMode mode=ForceMode.Force) |
Apply a force to a physical object. | |
A physical entity.
void SmashHammer.Scripting.IPhysical.ApplyForce | ( | Vector3Proxy | force, |
Vector3Proxy | position, | ||
ForceMode | mode = ForceMode.Force |
||
) |
Apply a force to a physical object.
force | Direction and magniture of the force, in world coordinates. |
position | Postion at which to apply the force, in world coordinates. |
mode | Type of force to apply. |
ForceMode enum:
Force | Apply a continuous force to the rigidbody, using its mass. Available in Lua as forceMode_Force . |
Acceleration | Apply a continuous acceleration to the rigidbody, ignoring its mass. Available in Lua as forceMode_Acceleration . |
Impulse | Apply an instant force impulse to the rigidbody, using its mass. Available in Lua as forceMode_Impulse . |
VelocityChange | Apply an instant velocity change to the rigidbody, ignoring its mass. Available in Lua as forceMode_VelocityChange . |