ecspresso
    Preparing search index...

    Interface Collision3DEvent<L>

    Event fired when two 3D entities collide.

    Normal components are flattened to avoid per-event allocation in the hot path.

    interface Collision3DEvent<L extends string = never> {
        depth: number;
        entityA: number;
        entityB: number;
        layerA: L;
        layerB: L;
        normalX: number;
        normalY: number;
        normalZ: number;
    }

    Type Parameters

    • L extends string = never
    Index

    Properties

    depth: number

    Penetration depth (positive = overlapping)

    entityA: number
    entityB: number
    layerA: L
    layerB: L
    normalX: number

    Contact normal X, pointing from entityA toward entityB

    normalY: number

    Contact normal Y, pointing from entityA toward entityB

    normalZ: number

    Contact normal Z, pointing from entityA toward entityB