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[];
        frictionImpulse: Vec3;
        frictionPoint: Vec3;
        linearVelocity1: Vec3;
        linearVelocity2: Vec3;
        numImpulses: number;
    }
    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)

    frictionImpulse: Vec3

    manifold-level linear friction impulse (kg⋅m/s), in the contact plane

    frictionPoint: Vec3

    Where friction acts: halfway between the two bodies' friction points (each the mean of that body's contact points), relative to manifold.baseOffset like the manifold's relativeContactPoints arrays.

    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)