[ODE] "Upright" body
Colin Bonstead
colin at cyan.com
Tue Apr 6 16:59:32 MST 2004
I'd like to have a physical that always stands upright on one of it's
axis, for the avatar. In our previous physics engine this was done by
setting the inverse inertial tensor to all zeroes, except for element
2,2 which was set to DBL_EPSILON. Frankly, I have no idea how this
works. However, that matrix is not invertable, so it can only work if
you can set the inverse matrix directly.
I actually hacked in a backdoor so I could set the inverse tensor but it
didn't work right in ODE. The avatar stayed upright, but I couldn't
move him. I'd prefer to move away from that method anyway, since it
kind of seems like a hack.
Another thing I tried is just zeroing out any rotation in the X and Y
after every step (Z is up in my sim). I know that is a crappy way to do
it, but I just wanted to see if it would work. It did, but not very
well. From searching through the ODE archives the only other suggestion
I could find was to apply a counter force after every step. That
doesn't sound very viable to me since you'll always be one step behind,
so your avatar will sort of vibrate.
Anyone have any other ideas? The angular motor seems like it could
help, but everything I've tried with it hasn't worked. I've read the
docs on it at least 10 times and I still don't think I really understand
what it does.
Thanks,
Colin
More information about the ODE
mailing list