self:set_gravity
Client
Sets the gravity magnitude of the area
Syntax
local status = self:set_gravity(
gravity
)Parameters
| Type | Name | Description |
|---|---|---|
float | gravity | Gravity magnitude to apply |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = physics.area.create()
entity:set_gravity(9.8)