Event
area:leave
SharedFired when a body or another area leaves the area
Signal
"area:leave"Arguments
| Type | Name | Description |
|---|---|---|
area | area | Area instance that was affected |
userdata | entity | Rigid, static, character, animatable body or area instance that triggered the signal |
Only physics entities known to the sandbox trigger this signal.
- Fires for rigid, static, character and animatable bodies, as well as other areas.
- Refer
physics.areato create and configure the area that emits it.
Example
local area = physics.area.create()
util.event.on("area:leave", function(area, entity)
core.engine.print("info", "area:leave:", entity:get_type())
end)