natiny.physics.get_velocity

Lua
natiny.physics.get_velocity(body) -> vx, vy, vz

Reads a body's linear velocity in world space.

Parameters

Name Type Description
body number Body handle

Returns

Type Description
number, number, number Metres per second along X, Y and Z

Example

Lua
local vx, vy, vz = natiny.physics.get_velocity(player)