crashcat docs
    Preparing search index...

    Type Alias CollisionEstimationResult

    Result of estimating collision response between two bodies.

    Contains predicted post-collision velocities, per-point normal (contact) impulses, and the manifold-level friction impulses (matching the per-manifold friction model used by the real solver).

    type CollisionEstimationResult = {
        angularFrictionImpulse: number;
        angularVelocity1: Vec3;
        angularVelocity2: Vec3;
        contactImpulse: number[];
        frictionImpulse1: number;
        frictionImpulse2: number;
        frictionPoint: Vec3;
        linearVelocity1: Vec3;
        linearVelocity2: Vec3;
        numImpulses: number;
        tangent1: Vec3;
        tangent2: Vec3;
    }
    Index

    Properties

    angularFrictionImpulse: number

    manifold-level angular friction impulse around the contact normal

    angularVelocity1: Vec3

    predicted post-collision angular velocity of body 1

    angularVelocity2: Vec3

    predicted post-collision angular velocity of body 2

    contactImpulse: number[]

    per-contact-point normal impulse (kg⋅m/s)

    frictionImpulse1: number

    manifold-level linear friction impulse along tangent1

    frictionImpulse2: number

    manifold-level linear friction impulse along tangent2

    frictionPoint: Vec3

    Average ("friction") contact point — unweighted mean of contact midpoints, in the same space as manifold.baseOffset (i.e. relative to baseOffset, like the manifold relativeContactPoints arrays). Friction impulses act at this point.

    linearVelocity1: Vec3

    predicted post-collision linear velocity of body 1

    linearVelocity2: Vec3

    predicted post-collision linear velocity of body 2

    numImpulses: number

    number of contact points (length of contactImpulse)

    tangent1: Vec3

    first friction tangent direction (perpendicular to normal)

    tangent2: Vec3

    second friction tangent direction (normal × tangent1)