[ODE] body auto disable

gl gl at ntlworld.com
Fri Jan 3 06:15:46 2003


> I've used the technique described here and it's reasonably
> effective; I also wait for rotational velocity to approach
> zero, however.

Good point : ).

> I'm in two minds about whether auto-disabling belongs in ODE itself,
> though.
> On the one hand it's something that can be done from the application
> itself via the API without too much pain.  On the other, grubbing
> through the simulation-side scene-graph is really something that I
> expect ODE itself to be better at (and more to the point it's
> something that ODE will be doing anyway as part of simulation, so
> the cost of walking the structures twice could be avoided).

Right, there's also this problem arising from auto-disabling: let's say two
cubes are resting on top of each other, with the lower resting on the
ground.  If the ground moves down, the cubes stay disabled and float as
there's no contact.  Ditto when the lower cube is deleted from the
simulation.

ODE is much better placed to re-activate any touching disabled bodies when
either of these scenarios happen.  I'm guessing this could be as simple as
slightly growing the internal AABB of the body that is changing/being
deleted to find close-by disabled bodies, and activating them.

Actually this is useful even with manual disabling, right?  Although there
may be occasions when you want an enabled body to stay disabled at all
times, so a per-body option to disallow auto-enabling would be handy.
--
gl