natiny.physics.get_velocity
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
local vx, vy, vz = natiny.physics.get_velocity(player)