self:get_gravity

Client

Retrieves the gravity magnitude of the area


Syntax

local gravity = self:get_gravity()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
floatgravityCurrent gravity magnitude

Examples

Get the gravity magnitude of an area
local entity = physics.area.create()

core.engine.print("info", "Area gravity:", entity:get_gravity())

On this page