threejs-worldgen
    Preparing search index...

    Interface MPMCollider

    A kinematic collider for MPMSolver.setColliders (e.g. a character's feet or vehicle wheels): a sphere, or a capsule from a to b. Material inside it loses the velocity it has into the collider relative to the collider's own velocity (Coulomb friction along the surface), and particles are pushed out to its surface.

    interface MPMCollider {
        a: [number, number, number];
        b?: [number, number, number];
        friction?: number;
        radius: number;
        velocity?: [number, number, number];
    }
    Index
    a: [number, number, number]

    Sphere centre, or one end of the capsule's axis, world metres.

    b?: [number, number, number]

    Other end of the capsule's axis, world metres (default a: a sphere).

    friction?: number

    Coulomb friction against it (default the solver's friction).

    radius: number

    Radius, metres.

    velocity?: [number, number, number]

    Velocity, m/s (default still): a moving collider pushes material along, a receding one lets go.