R3d.World:getGravity

From GiderosMobile

Available since: Gideros 2019.10
Class: R3d.World

Description

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

(number), (number), (number) = r3d.World:getGravity())

Return values

Returns (number) the world gravity on the x axis
Returns (number) the world gravity on the y axis
Returns (number) the world gravity 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())