[ODE] Re: program reacting slowly when Timestep= 0.01
denes at invictus.hu
Fri Sep 23 18:09:59 MST 2005
I assume you're using drawstuff; but the case is the same if not.
If you simply do one simulation step (e.g. dWorldStep(), dWorldQuickStep())
_per_frame_, your simulation speed will depend on the frame rate of course.
If your video card can render the current frames slower than the predefined
physics step, you'll have slow-motion, if faster, 'fast-motion'.
If you need _realtime_ sim.speed, you have to measure the actual time
elapsed after the last step (including both rendering and physics of
course), and simulate exactly that amount of time. Of course it's not a bad
idea to do it in fixed timesteps (say 0.05 or 0.01 secs), but you still need
to decide how many of these steps you need. :o)
My program reacts very slowly when is set the Time step from 0.05 to 0.01.
It's look like it is not working real-time. The processor usage is less then
10% en memory usage is also low. How is this possible? It's a very simply
program (buggy example) and I have an AMD ATHLON 64 3800+ with 1gig ddr
memory and 256mb video card. Sow that can not be the problem.
More information about the ODE