RealisticSolver
Implements
Index
Constructors
constructor
Parameters
config: Required<{ positionIterations?: number; slop?: number; steeringFactor?: number; velocityIterations?: number; warmStart?: boolean }>
Returns RealisticSolver
Properties
publicconfig
idToContactConstraint
lastFrameContacts
Methods
getContactConstraints
Parameters
id: string
Returns ContactConstraintPoint[]
postSolve
Parameters
contacts: CollisionContact[]
Returns void
preSolve
Parameters
contacts: CollisionContact[]
Returns void
publicsolve
Solves overlapping contact in
Solvers are executed in the order
- preSolve
- solveVelocity
- solvePosition
- postSolve
Parameters
contacts: CollisionContact[]
Returns CollisionContact[]
solvePosition
Iteratively solve the position overlap constraint
Parameters
contacts: CollisionContact[]
Returns void
solveVelocity
Parameters
contacts: CollisionContact[]
Returns void
warmStart
Warm up body's based on previous frame contact points
Parameters
contacts: CollisionContact[]
Returns void
A collision solver figures out how to position colliders such that they are no longer overlapping
Solvers are executed in the order