Mike36
Hi Zulbaric:
Your code looks like it's from the SkySphereDemo and EarthOrbitDemo that I created awhile ago. At the time, I didn't have the understanding of world coordinates and object coordinates that I do now, and that may be affecting your game. I'd suggest you take a look at this forum topic: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1212376&SiteID=1. If you're using the camera manager from the demo, the camera looks down the world's Z axis, so -Z is into the monitor. +X is towards the right, +Y is up.
The demo assumes (well, it should assume) that with the above orientation of the camera, the ship's nose is pointed towards the right, the ship's top is pointed at the top of the screen, and the ship's right wing is pointed at you. At the time, I didn't know how the .X processor works- it basically assumes that models coming in use the left-handed coordinate system and it flips the vertices around. I use Caligari trueSpace 7.11 to create my models, and based on my experiments, to get the model oriented the way I want, the model's +X axis points towards its tail, its +Y axis points towards its right wing, and its +Z axis points towards its top. If I do that, and then export the model using left-handed coordinates, then it appears the way I want.
If you go to http://www.spellflight.com/GameModes/EarthOrbitDemo.zip you'll find the latest demo code. skysphere.x, planet.x, and spacecraft.x models all oriented properly according to the above conventions, and you can use the following controls to orient the ship:
W: pitch up.
S: pitch down.
A: yaw left, unless left-shift key is down. In that case, roll left.
D: yaw right, unless left-shift key is down. In that case, roll right.
Also, be sure to reset your render states. I had to change the render states in order to get the textures to look right. Hope this helps.