I’ve been trying to extend the navigation features of my app to switch between standard OrbitControls to a constrained mode where the camera target moves, but the camera position remains. I am trying to switch to a camera control similar to how it works in the various examples with equirectangular maps: https://threejs.org/examples/?q=equirectangular#webgl_panorama_equirectangular.
For some reason, I’ve not been able to match up the camera rotations. Here is a codepen which demonstrates my issue: https://codepen.io/fraguada/pen/KEXzrE. Click on the button to toggle between modes.
You should be able to open up the console and type
toggleWaypoint() to switch between modes.
My intuition tells me I need to calculate the ‘latitude’ and ‘longitude’ from the camera’s rotation used in OrbitControls. What I’d like is to be able to switch between navigation modes seamlessly, without any views jumping suddenly.