Non-physical collision area with enter/stay/exit lifecycle. Does not apply forces — purely detection-based.
Usage:
const zone = new TriggerZone({ x: 100, y: 200, width: 64, height: 64, shape: 'aabb', filterTags: ['player'],});zone.onEnter(entity => console.log('entered'));zone.onExit(entity => console.log('exited'));zone.update(registry); // call each frame Copy
const zone = new TriggerZone({ x: 100, y: 200, width: 64, height: 64, shape: 'aabb', filterTags: ['player'],});zone.onEnter(entity => console.log('entered'));zone.onExit(entity => console.log('exited'));zone.update(registry); // call each frame
Check if a point is inside this zone
Get entities currently inside
Move the zone
Resize the zone
Check all entities against this zone. Call each frame.
Non-physical collision area with enter/stay/exit lifecycle. Does not apply forces — purely detection-based.
Usage: