Event

area:shape_enter

Shared

Fired when a body or another area enters one of the area's collision shapes

Signal

"area:shape_enter"

Arguments

TypeNameDescription
areaareaArea instance that was affected
userdataentityRigid, 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.area to create and configure the area that emits it.

Example

React when an entity enters a collision shape of an area
local area = physics.area.create()

util.event.on("area:shape_enter", function(area, entity)
    core.engine.print("info", "area:shape_enter:", entity:get_type())
end)

On this page