API

Interface PhysicsCollisionInfo

A single collision event reported by Havok after a physics step.

interface PhysicsCollisionInfo {
    collidedAgainst: PhysicsBody;
    collidedAgainstIndex: number;
    collider: PhysicsBody;
    colliderIndex: number;
    distance: number;
    impulse: number;
    normal: Vec3;
    point: Vec3;
    type: "STARTED" | "CONTINUED" | "FINISHED";
}
Index
collidedAgainst: PhysicsBody

Second participating body.

collidedAgainstIndex: number

Thin-instance index of collidedAgainst; 0 for an ordinary body.

collider: PhysicsBody

First participating body, corresponding to the reported contact point and normal.

colliderIndex: number

Thin-instance index of collider; 0 for an ordinary body.

distance: number

Signed separation along the first contact normal; negative values indicate penetration.

impulse: number

Magnitude of the impulse applied to resolve the contact (0 for FINISHED).

normal: Vec3

World-space contact normal at the contact point.

point: Vec3

World-space contact point (closest point on the first body).

type: "STARTED" | "CONTINUED" | "FINISHED"

Phase of the contact: a new contact, an ongoing contact, or a contact that just ended.