Skip to content

1681-engine / index / SolverSettings

Interface: SolverSettings ​

Defined in: src/physics/ContactSolver.ts:5

Tuning the solver reads; PhysicsWorld owns the values.

Properties ​

correction ​

ts
correction: number;

Defined in: src/physics/ContactSolver.ts:11

Share of the remaining overlap removed per position iteration.


maxCorrection ​

ts
maxCorrection: number;

Defined in: src/physics/ContactSolver.ts:13

The most one position iteration moves a pair apart (px), so a deep overlap is undone over a few steps, not flung.


restitutionThreshold ​

ts
restitutionThreshold: number;

Defined in: src/physics/ContactSolver.ts:7

Approach speed (px/s) below which nothing bounces, so a resting body does not hop on gravity's own step.


slop ​

ts
slop: number;

Defined in: src/physics/ContactSolver.ts:9

Overlap (px) left alone by position correction: a little keeps resting contacts alive and steady.

Released under the MIT License.