[ODE]WorldStep - FrameRate
Manohar B.S
sciphilog at yahoo.com
Thu Dec 4 22:24:38 MST 2003
> Lukas Henschke wrote:
> racecar drastically decelerates when i drive around
> the corner and my framerate drowps from 100fps to
> 30fps due to the level-geometry. And isn´t the
> stepsize only a degree of accuracy and not a degree
> of speed ? But when I alter the stepsize my car
> drives and falls in slow-motion and I have to adjust
> almost every parameter. So how do I make a
> simulation that is independent of the framerate.
> When I set my time_diff as the stepsize the whole
> thing gets very unstable when the framerate drops.
Hi, if I have grasped your problem right then I think
you are using the application template that is sent in
ODE package.
/* I am taking in windows */
The drawstuff(windows.cpp) is the parent which
actually calls the ODE fucntions through dsFunctions
struct. windows.cpp has a thread that calls simulation
step and graphics step once every loop.
To come out of this problem I have ported Drawstuff
to MFC compatible class which used CStatic frame to
render. Call dSpaceCollide in a separate thread,
possibly in a windows Timer or multimediatimer or a
thread at higher rate. Now graphics rendering could
be limited to 30 fps. in a different loop.
I could send my MFC implementation of ds if required.
With Regards
-- Manohar
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
More information about the ODE
mailing list