Documentation
    Preparing search index...

    Interface CollisionEvent<TBody, TCollider>

    Two colliders began touching, kept touching, or stopped touching (§29).

    TBody/TCollider are the reference types — opaque handles at the §37 layer, RigidBody/Collider components at the user-facing layer. See the module header.

    A/B ordering is the adapter's and carries no meaning beyond being consistent within one event: bodyA is the body owning colliderA, the normal points from A to B, and relativeVelocity is measured A relative to B.

    interface CollisionEvent<
        TBody = PhysicsBodyHandle,
        TCollider = PhysicsColliderHandle,
    > {
        bodyA: TBody;
        bodyB: TBody;
        colliderA: TCollider;
        colliderB: TCollider;
        contacts: readonly ContactPoint[];
        relativeVelocity: Vector3;
        totalImpulse: Vector3;
        type: CollisionPhase;
    }

    Type Parameters

    Index
    bodyA: TBody

    The body owning CollisionEvent.colliderA.

    bodyB: TBody

    The body owning CollisionEvent.colliderB.

    colliderA: TCollider

    The first collider of the pair.

    colliderB: TCollider

    The second collider of the pair.

    contacts: readonly ContactPoint[]

    The contact manifold for this step. Empty for "collisionend", which reports that the pair stopped touching and therefore has no contacts left to describe.

    relativeVelocity: Vector3

    Velocity of A relative to B at the contact, in metres per second — the quantity an impact sound or a damage model scales with.

    totalImpulse: Vector3

    Sum of the impulses the solver applied across CollisionEvent.contacts during the step, in newton-seconds, as a world-space vector.

    Which of §29's three collision names this is.