Area

self:set_monitoring

Shared

Sets whether the area monitors for other bodies/areas entering or leaving it

Syntax

local status = self:set_monitoring(
    state
)

Parameters

TypeNameDescription
boolstatetrue to enable monitoring, false to disable

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Enable monitoring on an area
local entity = physics.area.create()

entity:set_monitoring(true)

On this page