[ODE] exploding spinning objects
Nagymathe Denes
denes at invictus.hu
Mon Feb 13 08:35:36 MST 2006
Hi,
I have found a solution for the 'accelerating spinning objects' bug that
came up many times. There was a sort of patch that solved it for freely
spinning ones, but i think i have figured out the root of it. :o)
Near the start of dxQuickStepper() in quickstep.cpp, there's a loop for all
bodies which basically fills I and invI, and does this:
// compute rotational force
dMULTIPLY0_331 (tmp,I+i*12,body[i]->avel);
dCROSS (body[i]->tacc,-=,body[i]->avel,tmp);
...and for even a freely spinning body, this applies a _torque_ created from
its avel! Even after some investigation, i still found this unnecessary, and
commented it out. And the good news is that it is. Correct me if i'm wrong,
but in my environment, everything works just fine without these two lines,
and on top of it, now even long sticks are perfectly stable! :o)
Does anyone know why were these needed? If no, i'd like to ask you to test
this change to see if i'm really right.
Denes
ps. the same may apply to Step and StepFast as these two lines do exist
there too, but i didn't test them as i only use quickstep.
More information about the ODE
mailing list