API

Function setPhysicsShapeIsTrigger

  • Flag a collision shape as a trigger volume (or clear the flag).

    A trigger shape detects overlaps and reports PhysicsTriggerInfo events but does not produce a physical collision response — bodies pass through it. Attach the flagged shape to a body in the world, then listen with onPhysicsTrigger.

    Parameters

    • world: PhysicsWorld

      The physics world owning the shape.

    • shape: PhysicsShape

      The collision shape to flag.

    • isTrigger: boolean

      true to make the shape a trigger volume, false for a solid shape.

    Returns void