threejs-worldgen
    Preparing search index...

    Function projectFriction

    • Coulomb friction projection of v against a surface with unit normal n, only when moving into it: the inward part is removed (unless keepNormal) and the tangential part slowed by friction × inward speed.

      Parameters

      • v: number[]
      • n: number[]
      • friction: number
      • keepNormal: boolean = false

      Returns number[]