R3d.World:getGravity

From GiderosMobile
Revision as of 03:41, 18 December 2025 by MoKaLux (talk | contribs) (Created page with "'''Available since:''' Gideros 2019.10<br/> '''Class:''' R3d.World<br/> === Description === Returns the x, y and z gravity of the world. <syntaxhighlight lang="lua"> (num...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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())