   Combining roll, pitch and yaw correctly (or z,y,x rotation)
  Hi again,I currently have a space ship rendered in Direct3D. I want it to move as a spaceship or fighter jet would, that is I want it to roll on the z-axis and then change the direction of flight when the user "pulls up".The roll portion works great, the ship will roll forever.However I've hit a snag, when the user "pulls up" I can't seem to find the correct method to move the ship to represent the change in course.Any help will be greatly appreciated.Update:I uploaded some quick screen shots to help illustrate.http://jenova.defcon-gaming.com/up.jpghttp://jenova.defcon-gaming.com/right.jpghttp://jenova.defcon-gaming.com/diag.jpgIn the first, the ship should rotate fully on the X axis, straight up and down rolling.In the second, the ship should rotate fully on the Y axis, straight right and left rolling.However, in the 3rd it needs to be a combination of both of these and this is where I am stuck.The code I have tried ends up biasing the movement too much one way or the other and throws it into a spin of sorts :/[Edited by - KnyghtMare on May 26, 2006 11:57:36 PM]
  Hi, I didn't quite catch what was the problem but have a look at this link. It may help you understand the process (if you don't already know):http://mathworld.wolfram.com/EulerAngles.htmlIf you read carefully however, you will find out that Euler angles can potentially suffer from something called "Gimbal Lock" which can be avoided using Quaternions. (also can be found at the website).Hope I could help you a bit.   ;  I may be wrong, but, it looks like you may want to try using three vectors instead of Euler Angles?  I.E.  Look, Up and right vector.  Then rotate these vector accordingly and build a matrix out of it....   ;  Have you tried using D3DXMatrixRotationYawPitchRoll?   ;  I am using D3DXMatrixRotationYawPitchRoll. I started researching the alternatives (to avoid Gimbal Lock) but that won't be introduced in my work until I understand them in alot more detail.My problem is that I can't figure out how to combine the pitch and yaw values to result in the desired movement.Currently I have it figuring out how close it is to a full rotation on pitch or yaw and sharing out the movement quota (the stride, effectively) between Pitch and Yaw values. This ends up in the ship dancing around like crazy :/   