natiny.physics.set_gravity

Lua
natiny.physics.set_gravity(x, y, z)

Sets the acceleration applied to every dynamic body.

Parameters

Name Type Description
x number Acceleration along X, m/s^2
y number Acceleration along Y, m/s^2
z number Acceleration along Z, m/s^2

Example

Lua
natiny.physics.set_gravity(0, -1.62, 0)   -- the Moon