ZoneDetectionMode

@three-blocks/pro
const ZoneDetectionMode = { INTERSECT: 0, CONTAIN: 1, }
Value
{ INTERSECT: 0, CONTAIN: 1, }

Zone detection modes for trigger volumes.

Controls how zone entry/exit is detected:

  • INTERSECT: Triggers when player touches the zone (default, more reliable)
  • CONTAIN: Triggers only when player is fully inside the zone
Example
import { BodyType, ZoneDetectionMode } from '@three-blocks/pro';

// Default (intersect) - triggers on first contact
await physics.addBody(BodyType.ZONE, zoneMesh);

// Contain mode - triggers only when fully inside
await physics.addBody(BodyType.ZONE, zoneMesh, {}, {
  detectionMode: ZoneDetectionMode.CONTAIN
});