   OpenGL gluLookAt camera
  Hello, i have a problem with gluLookAt.I have camera class and so far it works. i can move forward backwards left right and rotate in x and y direction.But I dont know, how to rotate around a certain point. LEt's Say I want to rotate around point 0,0,0. My camera's position is at 0,0,10.I tried to solve this problem but i still have problems. They occure when i rotate around y then around z. X works fine. But Y and Z dont. When I rotate Z after Y,X rotation my Cube rotates a bit left, and then it turns over and rotates right. So it swing left and right. So, i really cant mix rotations.My Idea was to save the distance (vector) from the point where i want to rotate around and camera position.Then i rotate the camera vectors and then move the camera position to the point where i want to rotate around. Finally i builda vector from current camera position to rotatet view vector and then move thecamera back along this new normalized vector times the magnitude of the saved distance vector. guys i hope you could follow me. :(void CCamera::RotateX(float fArg){   // set rotation matrixm_mRotationMatrix.SetXRotationMatrix(fArgument);   // rotate camera vectorsm_vViewVector = (m_mRotationMatrix * m_vViewVector).Normalize();m_vUpVector   = (m_mRotationMatrix * m_vUpVector).Normalize();// set camera to originm_vPosition.SetAll(0.0f, 0.0f, 0.0f);// compute direction vector from Null position to view vectorVector3f vDirection = m_vViewVector - m_vPosition;// translate cameraposition in direction-vector directionm_vPosition = m_vPosition + (vDirection * -vDistance.Magnitude());}When i start the programm and want to y-rotate it works. then i close the program and restart. Now rotating x axis works fine too. Same procedure with z axis. But if  mix rotations it dosnt work fine.Does anyone has an idea how to fix this problem ?greetings,xiaowei   
  http://en.wikipedia.org/wiki/Gimbal_locku should be able to google further info + solutions   ;  Hello, thanks for your reply.Well i thought again about my problem. Maybe it is caused because when i rotate around x,y,z together i actually rotate around abitrary axes. So I should compute the rotation axes before a rotation. For example x rotation i compute a rotaion axis that is the vector from camera position to view point.That could be possilbe as well, right ?greetings,xiaowei   ;  >>Hello, thanks for your reply.dont thank me, just look up about gimbal lock, theres lots of info on the internet about it + possible solutionseghttp://www.sjbaker.org/steve/omniv/eulers_are_evil.html   