self:overlaps_body

Client

Checks whether a specific physics body currently overlaps the area


Syntax

local result = self:overlaps_body(
    body
)

Parameters

TypeNameDescription
objectbodyPhysics body instance to check

Returns

TypeNameDescription
boolresulttrue if the body overlaps the area, false otherwise

Examples

Check if a body overlaps an area
local entity = physics.area.create()
local player = physics.character.create()

core.engine.print("info", entity:overlaps_body(player))

On this page