Documentation
    Preparing search index...

    Class PhysicsMaterial

    Surface properties shared by any number of colliders (§25).

    const rubber = new PhysicsMaterial({ friction: 0.9, restitution: 0.8, density: 1100 });
    const ice = new PhysicsMaterial({ friction: 0.05 });
    combineFriction(rubber, ice); // 0.475 — Appendix A: average
    combineRestitution(rubber, ice); // 0.8 — Appendix A: maximum

    Omitted options take DEFAULT_FRICTION, DEFAULT_RESTITUTION, and DEFAULT_DENSITY; the two optional §25 coefficients stay undefined when omitted, because "not specified" and "zero rolling resistance" are different statements and an adapter that supports rolling friction needs to tell them apart.

    Index
    density: number

    Mass per unit volume in kg/m³ (§25). Only a fallback for mass derivation: Collider.density wins wherever both exist — see resolveDensity.

    friction: number

    Coulomb friction coefficient (§25).

    restitution: number

    Restitution — how much normal velocity a contact returns (§25).

    rollingFriction?: number

    Rolling resistance (§25). undefined means "unspecified"; adapters that model it fall back to their own default, and adapters that do not ignore it.

    spinningFriction?: number

    Spin resistance (§25). Same undefined semantics as rolling friction.