Skip to main content

CollisionSolver

A collision solver figures out how to position colliders such that they are no longer overlapping

Solvers are executed in the order

  1. preSolve
  2. solveVelocity
  3. solvePosition
  4. postSolve

Implemented by

Index

Methods

Methods

solve

  • Solves overlapping contact in

    Solvers are executed in the order

    1. preSolve
    2. solveVelocity
    3. solvePosition
    4. postSolve

    Parameters

    • contacts: CollisionContact[]
    • optionalduration: number

      length of the (sub)step in ms

    • optionalsubstep: number

      index of the substep within the current frame, starting at 0

    • optionalsubstepCount: number

      total number of substeps in the current frame

    Returns CollisionContact[]

Page Options