API

Interface PhysicsTriggerBodyInfo

Trigger event including the two participating bodies.

interface PhysicsTriggerBodyInfo {
    bodyA: PhysicsBody | null;
    bodyAIndex: number;
    bodyB: PhysicsBody | null;
    bodyBIndex: number;
    type: "ENTERED" | "EXITED";
}

Hierarchy (View Summary)

Index
bodyA: PhysicsBody | null

First body reported by Havok, or null if it is no longer tracked.

bodyAIndex: number

Thin-instance index of bodyA, or -1 when the body is no longer tracked.

bodyB: PhysicsBody | null

Second body reported by Havok, or null if it is no longer tracked.

bodyBIndex: number

Thin-instance index of bodyB, or -1 when the body is no longer tracked.

type: "ENTERED" | "EXITED"

ENTERED when a body enters the trigger volume, EXITED when it leaves.