Description
|
Retrieves the linear and/or angular velocity of an object, in absolute coordinates. The velocity is a measured velocity (i.e. from one simulation step to the next), and is available for all objects in the scene. See also simGetVelocity.
|
C synopsis
|
simInt simGetObjectVelocity(simInt objectHandle,simFloat* linearVelocity,simFloat* angularVelocity)
|
C parameters |
linearVelocity: pointer to 3 values that will receive the linear velocity. Can be NULL
angularVelocity: pointer to 3 values that will receive the angular velocity. 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=simGetObjectVelocity(number shapeHandle) |
Lua parameters |
objectHandle: same as C-function
|
Lua return values
|
linearVelocity: table containing 3 values that represent the linear velocity, or nil in case of an error
angularVelocity: table containing 3 values that represent the angular velocity, or nil in case of an error
|