Ship Movement

Hi, this is my first post and I’m a bit of a n00b when it comes to this kind of thing so please forgive me.

Basically, I’m working on a game in which the player flies a ship around over a landscape. I have x,y and z coords stored for the ship, aswell as x,y and z rotations which are carried out via glRotatef each frame.

My problem is that I can’t get the ship to steer properly. I have the up arrow key decreasing the z-coord of the ship (making it move forwards) and “z” and “x” keys to rotate the ship ACW and CW respectively. In my draw loop for the ship, if I rotate then translate to the x,y and z coords, the ship is rotated around the main origin making it appear to move sideways when it gets further away from the origin. If I switch rotate and translate around, it draws the rotatated ship at it’s coordinates, but the ship still moves on the universal axes (i.e. it carries on moving forwards relative to the origin and so appears to just rotate on the spot as it moves, the rotation having no effect on it’s direction).

Here’s a screen of it so far:

http://www.arkangel-software.co.uk/Assets/Images/Ship3.jpg

I’m really stuck with this so any help would be greatly appreciated =)

Thanks,
Steve

This has been answered in the beginner’s forum:
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=2;t=018298