Got the auto disable to work now. Usefull feature, the API is very simple but somewhat crude (“manual”) though, so I’ll postpone committing this before I can come up with an reasonable good API.
You can set threshold and stepsize for each body that you wish to use auto disable feature.
This will make stacking more stable, e.g. big brick of walls is no longer generating any contact points as bodies get soon automatically disabled because their angular and linear velocities are very small for X steps. Also brick walls act now better because objects simply get stuck more easily, visibly it’s like higher friction.
It’s also reasonable to disable any body that is moving extremely little, e.g. a box lies on the ground. With this feature you get visibly inactive bodies to get disabled automatically. This can also help objects from “trembling” against flat ground or more complex terrain.
Note that ODE itself automatically enables any body that comes in contact with active body.
There’s also some performance gain if you tend to have some objects that do not move all the time on the simulation, I assume this is quite typical scenario in various simulations.
I’ll write new mail to this thread after I have committed this feature.