self:set_gravity

Client

Sets the gravity magnitude of the area


Syntax

local status = self:set_gravity(
    gravity
)

Parameters

TypeNameDescription
floatgravityGravity magnitude to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:set_gravity(9.8)

On this page