Regular API
function
simAddForce
Description
Adds a non-central force to a shape object that is dynamically enabled. Added forces are cumulative, and are reset to zero after
simHandleDynamics
was called. See also
simAddForceAndTorque
.
C synopsis
simInt simAddForce (simInt shapeHandle,const simFloat* position,const simFloat* force)
C parameters
shapeHandle
: handle of a dynamically enabled shape
position
: pointer to 3 values that represent the relative position where the force should be applied.
force
: pointer to 3 values that represent the force (in relative coordinates) to add.
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis
number result=simAddForce(number shapeHandle,table_3 position,table_3 force)
Lua parameters
Same as C-function
Lua return values
Same as C-function
All regular API functions on one page