ecspresso
    Preparing search index...

    Interface Physics2DCollisionEvent

    Event emitted for each physics collision pair.

    Normal components are flattened (normalX/normalY) rather than nested in a Vector2D to avoid a per-event allocation in the physics hot path.

    interface Physics2DCollisionEvent {
        depth: number;
        entityA: number;
        entityB: number;
        normalX: number;
        normalY: number;
    }
    Index

    Properties

    depth: number

    Penetration depth (positive)

    entityA: number
    entityB: number
    normalX: number

    Unit normal X, pointing from A toward B

    normalY: number

    Unit normal Y, pointing from A toward B