SFAOK
08-02-2007 15:54:41
I am using FRAPS to record my simulation in action.
Sometimes I simulate a single creature at 200fps, other times 1000 creatures at <1fps.
Before I added physics to my engine, I could run FRAPS (setting it at 60fps), and it would record these frames in non-realtime, i.e even if I left the simulation running for an hour where the frame updates every 5 seconds, I'd return and have a completely normal 12 second video running at 60fps.
How can I make OgreNewt behave in the same way? I've made a simple environment, where I just throw more and more cubes into a pile. Obviously the framerate steadily drops torwards 1fps eventually - but when I play the video back, the slower the engine runs, the faster the cubes seem to move.
Is there any way to make the physics engine update consistently with the frame rate? I guess what I'm looking for is to set my variables for 'proper' results at 60fps, where a framerate below that causes a slow motion effect, and higher frame rates causing speed-up.
EDIT : I've reduced the linear and angular dampening to 0.001 (so the simulation is more deterministic), and tried some of the other solutions found in this forum regarding frame-rate, but I simply can't get it to work).
Sometimes I simulate a single creature at 200fps, other times 1000 creatures at <1fps.
Before I added physics to my engine, I could run FRAPS (setting it at 60fps), and it would record these frames in non-realtime, i.e even if I left the simulation running for an hour where the frame updates every 5 seconds, I'd return and have a completely normal 12 second video running at 60fps.
How can I make OgreNewt behave in the same way? I've made a simple environment, where I just throw more and more cubes into a pile. Obviously the framerate steadily drops torwards 1fps eventually - but when I play the video back, the slower the engine runs, the faster the cubes seem to move.
Is there any way to make the physics engine update consistently with the frame rate? I guess what I'm looking for is to set my variables for 'proper' results at 60fps, where a framerate below that causes a slow motion effect, and higher frame rates causing speed-up.
EDIT : I've reduced the linear and angular dampening to 0.001 (so the simulation is more deterministic), and tried some of the other solutions found in this forum regarding frame-rate, but I simply can't get it to work).