// Allocate a few equations before starting the simulation. // This way, no contact objects need to be created on the fly in the game loop. world.narrowphase.contactEquationPool.resize(1024); world.narrowphase.frictionEquationPool.resize(1024);
Whether to make friction equations in the upcoming contacts.
enableFrictionReduction
enableFrictionReduction:boolean
Enable reduction of friction equations.
If disabled, a box on a plane will generate 2 contact equations and 2 friction equations.
If enabled, there will be only one friction equation. Same kind of simplifications are made for all collision types.
deprecated
This flag will be removed when the feature is stable enough.
default
true
enabledEquations
enabledEquations:boolean
Whether to make equations enabled in upcoming contacts.
Creates a FrictionEquation given the data in the ContactEquation.
Uses same offset vectors ri and rj, but the tangent vector will be constructed from the collision normal.
Narrowphase. Creates contacts and friction given shapes and transforms.