termit7577
02-02-2007 14:13:32
Hi all! In Ode I often see a situation, where a body gets turned only by itselft, whereas all its axes stay where they are. Thus, say, if I control and object and click to move forwatd, its OK, but as soon as I do a quaternion turn to the object, the object (i.e. the Body) turns, and yet continues to move "fowrard" as if it never was turned. Very annoying!
termit7577
02-02-2007 18:23:11
In other words, even when Body rotates via setOrientation, its LinearVelocity vector remain absolute (!!!). Thus, there is no way to control, where the object is meant to be moving after the rotation. That's very weird IMHO. Or is it just me?
foxbat
03-02-2007 06:48:07
I think you will need to set the linear velocity each frame, and multiply the velocity vector by you body's orientation quaternion. Linear velocity is set relative to world space, not relative to the model's heading direction.
termit7577
03-02-2007 20:13:23
Thnx for reply. I have realised it lately... but took me ages

Since in ODE's documentation it sort of says, that linear velocity is set according to the body's internal XYZ. Turns out its absolute, makes things a bit harder, but still fine.