Famous / engine

MIT License
1.75k stars 250 forks source link

[question] how does one test that the PhysicsEngine has converged? #500

Open CompSciFutures opened 8 years ago

CompSciFutures commented 8 years ago

The PhysicsEngine is super neat, but for many situations one doesn't need to keep using an onUpdate() + PhysicsEngine.update() loop after a while and when one has a few of them going they start to bog down the browser a bit.

As an example use case, once a widget has collided/bounced/whatevered its way into place then I would like to temporarily disable that simulation to avoid unnecessarily eating CPU and generating infinitesimally small transformation changes.

Has anyone worked out a way to test if a particular instance of a PhysicsEngine has converged WRT some epsilon?

Obviously there are certain configurations where the PhysicsEngine won't ever converge.

ap