Description
|
Retrieves the linear and/or angular velocity of the center of mass of a non-static shape object. See also sim.getObjectVelocity.
|
C/C++ synopsis
|
simInt simGetVelocity(simInt shapeHandle,simFloat* linearVelocity,simFloat* angularVelocity)
|
C/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/C++ return value
|
-1 if operation was not successful
|
Lua synopsis
|
float[3] linearVelocity,float[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
|
Python synopsis |
list linearVelocity,list angularVelocity=sim.getVelocity(int shapeHandle) |