Regular API function

simGetVelocity / sim.getVelocity

Description Retrieves the linear and/or angular velocity of the center of mass of a non-static shape object. See also sim.getObjectVelocity.
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 nullptr
angularVelocity: pointer to 3 values that will receive the angular velocity in absolute coordinates. Can be nullptr
C return value
-1 if operation was not successful
Lua synopsis table[3] linearVelocity,table[3] angularVelocity=sim.getVelocity(int 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
angularVelocity: table containing 3 values that represent the angular velocity in absolute coordinates