As forces are reseted after returning from b2World::Step(), and there is no
way to backup and restore them, is impossible to implement the Glenn
Fiedler's technique "fix your timestep" (used also by Bullet).
The technique allows to use a fixed time step with the physics system
(maintaining a good numerical stability) while having a variable frame-rate
game, keeping the physics in sync with the real clock.
Proposed solutions:
- Add accessors to b2Body to backup and restore applied forces.
- Modify b2World::Step() with a flag to know if it have to reset applied
forces. This allows to perform minor physics logic (as controllers) between
subsequent calls to Step() (in the same game tick).
Some other details in
http://www.box2d.org/forum/viewtopic.php?f=4&t=3973&start=0 .
Original issue reported on code.google.com by daniele.benegiamo@gmail.com on 19 Nov 2009 at 12:47
Original issue reported on code.google.com by
daniele.benegiamo@gmail.com
on 19 Nov 2009 at 12:47