[ODE] Mixing WorldStep, QuickStep and/or StepFast

Roel van Dijk roelvandijk at home.nl
Tue Jun 8 22:51:18 MST 2004


On Tuesday 08 June 2004 21:24, Gabriel Gambetta wrote:
> Is it possible / does it make sense mixing the precise-but-expensive
> WorldStep with the approximate-but-fast methods?
>
> What I'm thinking is a game, say with a 60Hz physics update, where good
> framerates are more important than perfect accuracy. The idea would be
> to do a WorldStep every 10 frames and do QuickStep or StepFast in the
> frames in between, to keep the error from accumulating too much.
>
> Note that this is purely speculative since physics aren't currently
> having any performance effect in my prototype, and I'm fully aware one
> shouldn't optimize prematurely, but the idea crossed my mind and I
> wanted to ask :)
You could flag bodies to be solved with a specific solver. But all bodies in 
an island must be solved by the same solver. So you would need some sort of 
order in the solvers. Because when 2 bodies in an island each want a 
different solver you need to pick one.
That way you could simulate a car more accurately then a brick wall. But when 
the car hits the brick wall you must either solve the whole brickwall with 
WorldStep or simulate the car with QuickStep or StepFast.
All this requires a bit of hacking in ODE's source but it shouldn't be to 
hard.


More information about the ODE mailing list