Changed World:update(dt) to default to Box2D's recommended 3 internal position iterations instead of 6. Added a new variant World:update(dt, velocityiterations, positioniterations) which lets you specify the number of velocity and position iterations Box2D performs when updating the world. The defaults are 8 and 3 respectively, higher numbers increase precision and reduce performance.

Resolves issue #1135.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-02-14 20:06:16 -04:00
parent 1be2e34c92
commit 20b77bd28c
3 changed files with 18 additions and 2 deletions
+1
View File
@@ -131,6 +131,7 @@ public:
* @param dt The timestep.
**/
void update(float dt);
void update(float dt, int velocityIterations, int positionIterations);
// From b2ContactListener
void BeginContact(b2Contact *contact);