natiny_physics_get_velocity
void natiny_physics_get_velocity(NatinyBody body, float* vx, float* vy, float* vz);
Reads a body's linear velocity in world space.
Parameters
| Name | Type | Description |
|---|---|---|
body |
NatinyBody |
Body handle |
vx |
float* |
Receives metres per second along X; may be null |
vy |
float* |
Receives metres per second along Y; may be null |
vz |
float* |
Receives metres per second along Z; may be null |
Example
float vx, vy, vz;
natiny_physics_get_velocity(player, &vx, &vy, &vz);