natiny_physics_set_velocity
void natiny_physics_set_velocity(NatinyBody body, float vx, float vy, float vz);
Sets a body's linear velocity in world space and wakes it.
Parameters
| Name | Type | Description |
|---|---|---|
body |
NatinyBody |
Body handle |
vx |
float |
Metres per second along X |
vy |
float |
Metres per second along Y |
vz |
float |
Metres per second along Z |
Example
natiny_physics_set_velocity(player, 0.0f, 5.0f, 0.0f); /* jump */