I am trying to teach myself some basic OpenGL and have been going through the NeHe tutorials and understand most of it, in fact I even added a bunch of code to one of them so that you can use the mouse to look around like you can in any first person game and the WASD keys to move the camera around. But now I have this little marble like ball on a flat surface and I am using the arrow keys to move it around, not "jerkily" like a simple implementation would be where you push left and it instantly starts moving left and then instantly stops when you release it but with acceleration while you hold the key, deceleration due to a friction coefficient on the surface, and all that good stuff. It looks great except I am having a problem getting the sphere to rotate correctly so that it is in "sync" with its movement (the ball is textured so you can tell it looks wrong). From the origin if I go straight forward or back, along the z-axis, it rotates about the x-axis and looks perfect. Also if I go straight left or right from the origin (along the x-axis) it looks perfect and rotates about the z-axis. The problem, however, occurs when I combine movement on both of these axes. Say for example I move it forward a quarter rotation, then attempt to move left... it ends up rotating about the y-axis in the world coordinate system (spinning on its south pole, as it moves left, if that helps you picture it). I know why this happens, it's because when I moved it forward a quarter rotation I also rotated the spheres z-axis up so that it lines up with the y-axis in world coordinates (from front-back to top-bottom). I just don't know how to compensate for that... I mean its easy if it were only half or quarter rotations that I had to worry about but it's not, which leads me to believe I will have to, for example, use its current rotation about the x-axis to determine the percentage split between rotation on the z-axis and rotation on the y-axis whenever I want to move left-right... Thinking along these lines it seems like I will have to take into account the current rotation on all 3 axes to determine the amount of rotation on all 3 axes every time it moves in any direction. That is unless of course there is a much easier way to do this x, maybe by loading the identity matrix after each rotation to re-allign the axes of the sphere with the world coordinate system, or something. So I guess my question is has anyone done this before, is there complex as hell math involved or is there some easy method that OpenGL provides?