It is unclear where all the things that you have happen are happening since you did not publish all your code and it was disabled in strange places. But if you want to move the camera left and right, this should be pretty easy. Definition of gluLookAt() :
gluLookAt (cameraX, cameraY, cameraZ, lookAtX, lookAtY, lookAtZ, upX, upY, upZ);
Moving the camera left and right without changing the angle is called a βtruckβ, and sometimes the arrows of the 1st person refer to it as a symbol striking left or right. To do this, you need to move the camera and the search point by the same amount as this:
gluLookAt (cameraX + deltaX, cameraY + deltaY, cameraZ + deltaZ, lookAtX + deltaX, lookAtY + deltaY, lookAtZ + deltaZ, upX, upY, upZ);
For left and right, deltaX will look like + or - some amount, while deltaY and deltaZ are likely to be 0.
source share