Regular API function

simAddForceAndTorque

Description Adds a force and/or torque to a shape object that is dynamically enabled. Forces are applied at the center of mass. Added forces and torques are cumulative, and are reset to zero after simHandleDynamics was called. See also simAddForce.
C synopsis simInt simAddForceAndTorque(simInt shapeHandle,const simFloat* force,const simFloat* torque)
C parameters
shapeHandle: handle of a dynamically enabled shape
force: pointer to 3 values that represent the force (in absolute coordinates) to add. Can be NULL.
torque: pointer to 3 values that represent the torque (in absolute coordinates) to add. Can be NULL
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=simAddForceAndTorque(number shapeHandle,table_3 force,table_3 torque)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page