OK hello everyone again.
You may or may not know that I have been struggling with a quaternion rotation system in my 3D OpenGL game written in C.
I managed to work it out (with the help of a few helpful developers) but I have now another problem: how to translate.
I was told to ‘find the z vector from the matrix’ and translate along that but that doesn’t work.
How do I work out a set of coordinates to translate to when I have a rotation matrix and quaternion?
shipRotation.z = pitch * DEG_TO_RAD ; shipRotation.y = heading * DEG_TO_RAD ; shipRotation.x = roll * DEG_TO_RAD; q1 = eulerToQuat(shipRotation); q2 = quatMult(q1,q2); shipMatrix = quatToMatrix(q2); glMultMatrixf( shipMatrix.m );