The physics space to register listeners on.
The body acting as the trigger zone. Its shapes should have
sensorEnabled = true (the constructor enables it automatically
for all shapes that don't already have it set).
Optionaloptions: TriggerZoneOptionsOptional configuration and initial handlers.
The body acting as the trigger zone.
Whether the zone is active. When disabled, no callbacks fire.
Called once when an interactor enters the zone.
Called once when an interactor exits the zone.
Called every simulation step while an interactor remains in the zone.
The space the zone is registered on.
High-level trigger zone — Unity-style
onEnter/onStay/onExitwrapper over the nape callback system.Automatically creates sensor-based InteractionListeners and manages their lifecycle. Assign handlers directly or via the constructor options.
Example