To be clear, I’m not trying to set the position of the camera (i.e. where it is) I’m trying to set the gaze of the camera (i.e. what it is looking at).
Assume the position of the camera is on the equator, at some longitude, and I just want it to pan over to look at some other lat / long.
Camera.lookAt is indeed intended to set both the position and orientation of the camera. The target is the position at which the camera should be pointing. The offset lets the camera know how far away from the target it’s new position should be. For example, Cartesian(0, 0, 10) tells the camera to move 10m above the target and look straight down.
Passing in (0,0,0) causes an error because it puts the camera in an invalid state. There are infinitely many orientations the camera could be in that satisfy an offset of 0.
If you simply want to turn the camera, you can use the setView function. If you only pass an orientation, it’ll turn the camera without moving it.
Guess “lookAt” is just a bad name. That being said, can you point me to a simple example of how to use setView to set the orientation of the camera to point at a given lat/long?
In particular, it’s not obvious how to calculate the “up” vector. (I’d love to leave it unchanged, if that makes sense. Simply move the orientation without changing that “up” is.)