Regular API function

simGetVelocity

Description Retrieves the linear and/or angular velocity of the center of mass of a non-static shape object. See also simGetObjectVelocity.
C synopsis simInt simGetVelocity(simInt shapeHandle,simFloat* linearVelocity,simFloat* angularVelocity)
C parameters
shapeHandle: handle of a dynamically enabled shape
linearVelocity: pointer to 3 values that will receive the linear velocity in absolute coordinates. Can be NULL
angularVelocity: pointer to 3 values that will receive the angular velocity in absolute coordinates. 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 table_3 linearVelocity,table_3 angularVelocity=simGetVelocity(number shapeHandle)
Lua parameters
shapeHandle: handle of a dynamically enabled shape
Lua return values
linearVelocity: table containing 3 values that represent the linear velocity in absolute coordinates, or nil in case of an error
angularVelocity: table containing 3 values that represent the angular velocity in absolute coordinates, or nil in case of an error

All regular API functions on one page