I have a (hopefully) simple questions. I’m trying to get the pitch and yaw angles for a camera from the (x,y) mouse position so I can update my LookAt vector (for gluLookAt). I know to update the vector to use:
lookat.x = radiuscos(phi)cos(theta);
lookat.y = radiussin(phi);
lookat.z = radiuscos(phi)*cos(90.0-theta);
But I can’t seem to compute a phi and theta that work correctly. I’m pretty new to opengl.