Odejava: added AutoDisable / AutoEnable

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.

This sounds like a great addition since we’ve got all sorts of jostling of objects going on when they’re lying on the ground, supposedly at rest.

I’ll be able to try it out this week sometime, or whenever you manage to check it in.

Matt

Haven’t got too much of time to code with Odejava lately, but this weekend I’ll commit the AutoDisable/AutoEnable related functionality. Even if I had no time to do anything with the API, I’ll just put it in. It works and the feature is easy to use, but the API is not too pretty. I’ll comment the API and describe that they are bound to change in some way in the near future.

But at least people can use and test the new feature, which is always important…

has autodisable been removed again or did it never make it to the cvs?

I believe Jani worked on autodisable but didn’t have it fully ready for release.

It actually was commited by mistake a while ago, then undone. So the changes are in there somewhere if you look hard enough (not that they are fully operational…).

Best idea would be to contact Jani and see how he is going with the patch.

Will.