Hi, quick question. I hope the solution is as simple as I imagine. I’ve used the method at the bottom of this page: (http://www.songho.ca/opengl/gl_anglestoaxes.html) to perform rotations on each axis, which works exactly how I want. The problem I’m having with it is with roll rotations (z axis). X and Y work perfectly, but the roll seems to go in the same direction every time, as in left to right and it does so in the same direction regardless of other axis rotations.
left.x = cy*cz;
left.y = sx*sy*cz + cx*sz;
left.z = -cx*sy*cz + sx*sz;
// determine up axis
up.x = -cy*sz;
up.y = -sx*sy*sz + cx*cz;
up.z = cx*sy*sz + sx*cz;
// determine forward axis
"forward.x = sy;
forward.y = -sx*cy;
forward.z = cx*cy;"
Here’s where I assume I’m making the error. I noticed the other two axis are determined by adding other axises. Is there something missing from this?
Thanks,
Paul