natiny.physics.set_velocity
natiny.physics.set_velocity(body, vx, vy, vz)
Sets a body's linear velocity in world space and wakes it.
Parameters
| Name | Type | Description |
|---|---|---|
body |
number |
Body handle |
vx |
number |
Metres per second along X |
vy |
number |
Metres per second along Y |
vz |
number |
Metres per second along Z |
Example
natiny.physics.set_velocity(player, 0, 5, 0) -- jump