[ODE] auto-disable implemented (again)

Simon Brown simon.brown at justaddmonsters.com
Mon Mar 1 16:29:41 MST 2004


This can be solved by having bodies "count down" their remaining active
time.

For example, when a body is active, it sets its internal clock at a 2 second
countdown timer. This clock is reduced by the step time when the body is not
active, and once it hits 0, the body is disabled.

We use this trick to get around single-precision badness all the time.

Ta,
Si

----- Original Message ----- 
From: "Aras Pranckevicius" <nearaz at interamotion.com>
To: <ode at q12.org>
Sent: Monday, March 01, 2004 4:02 PM
Subject: Re: [ODE] auto-disable implemented (again)


> > > * When a body has remained a disable-candidate for certain number of
> > > successive steps, it gets disabled.
> >
> > >From experience, you may want to make this 'elapsed sim time' instead
of
> > number of steps. Otherwise you can get quite different behaviour
> > when the timestep is different - for example things will turn off
> > more readily if you have a high frame rate or are running in slow-mo.
>
> That's probably a better solution...
>
> However, it does require tracking of "current" time somehow (eg. in the
> World). My impression is that ODE doesn't do any time tracking - it just
> steps by a given time interval, and that's all.
>
> Of course, adding some "dReal time" to World and updating it in
step/stepfast
> isn't a big issue (but it could be an issue if single precision is used -
> floats lose accuracy fairly fast). In our work projects, we use 64 bit
> integers for times (provides some 290 thousant years at microsecond
> precision).
>
> Of course, this all isn't necessary if your physics is running at a
constant
> rate. I'm games, and my situation having fixed dt is better :)
>
>
> Aras Pranckevicius aka NeARAZ
> http://www.gim.ktu.lt/nesnausk/nearaz/
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list