self:get_overlapping_bodies

Client

Retrieves all physics bodies currently overlapping the area


Syntax

local bodies = self:get_overlapping_bodies()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
tablebodiesArray of overlapping physics body instances

Examples

Get overlapping bodies on an area
local entity = physics.area.create()

for i, body in ipairs(entity:get_overlapping_bodies()) do
    core.engine.print("info", "Area overlapping bodies:", body)
end

On this page