Original Post
Hi, I'm trying to understand which is a good solution to work with camera transformations: to allow the user to freely move around the space, or to rotate around a selected object, I've chosen to use gluLookAt. Hence, in my Camera class, I store informations about camera position and direction with two vectors. It works fine, but now I need to know the camera rotation angles for other tasks. How can I obtain them? Should I store their value or get them from the previous two vectors? Actually, when the user moves the mouse of dx and dy, I just do: Camera.Direction.x += dx; Camera.Direction.y += dy; Camera.Direction.Normalize(); Instead, using the arrow keys: Camera.Position.x += dx; Camera.Position.y += dy; And finally: gluLookAt(Camera.Position.x, ...); If I'd save something like: float RotX, RotY, RotZ; How could I update all these angles since I just know dx/dy? Thanks for any hints!