Good day friends,

I’m writing the camera code for my scene in openGl. I’m attempting to write a code that enable me to zoom in/out and rotate the camera. The problem is that to rotate the camera I need to change the coordinates for both X & Z, but also to zoom in/out I need to adjust the Z coordinates. How can resolve this conflict between the zooming and rotation of the camera given that both need to use the Z coordinates?

thank you

You need to manipulte the view vector for gluLookat for the camera rotation, where as for ‘zooming’ you are changing the eye position XYZ. So, there is no conflict.