R3d.World:setGravity

From GiderosMobile

Available since: Gideros 2019.10
Class: R3d.World

Description

Sets the x, y and z gravity of the world.

r3d.World:setGravity(gx,gy,gz)

Parameters

gx: (number) the world gravity in Newtons on the x axis
gy: (number) the world gravity in Newtons on the y axis
gz: (number) the world gravity in Newtons on the z axis

Example

local world = r3d.World.new(0, -9.8, 0) -- gravity x, y, z, params
world:setGravity(0, 0, 0)
print(world:getGravity())