Original Post
Im having some trouble with camera view rotation in openGL using lib3ds. The rotation is going around the x-y axis and I am using the following function: void rotateCamera(float ang) { Lib3dsVector view; //get the view vector by subtracting the cam position from the target lib3ds_vector_sub(view, cam->target, cam->position); double lx = 0; double ly = 0; lx = ((view[0] * cos(ang)) + (sin(ang) * view[1])); ly = ((view[1] * cos(ang)) - (sin(ang) * view[0])); glLoadIdentity(); cam->target[0] = lx; cam->target[1] = ly; glutPostRedisplay(); showInfo(); } the Lib3dsVector structure is just a float[3]... The problem im having is when the camera view is rotating, rotation seems to speed up at some points and slow down at others. Also when the camera positions Z (up/down) value is set to something other than 0, the camera view seems to move up and down and all around? Any idea's anyone?