[ODE] body auto disable
Erwin de Vries
erwin at vo.com
Mon Dec 23 04:59:02 2002
Hi,
I'm thinking about what would be the best way to do this. I was thinking
about a solution which basically does the following:
- Add a dReal 'DisableTimer' to the dBody struct.
- Add a dxBodyFlagAutoDisable which enables or disables this feature per
body.
- Each step add the steptime to this timer if the velocity is smaller than
V. Else reset it to 0.
- If the timer is larger than T disable the body.
It could either be implemented that V is a user defined value, but it could
also be determined from the inertia matrix of the body, which would be a
better solution i believe. Large objects get disabled sooner than small
objects.
T should be user defined i believe. It could default to something like 5
time units (seconds).
I'd think this would be fairly easy to implement. Any comments?
Erwin