Hi everybody,
I’m struggling with the task how to fly from position A to position B as shown in the pictures. I can get to desired position by using functions such as:
camera.moveRight, camera.moveLeft, …
camera.zoomOut,
camera.twistRight
, which I binded to keyboard buttons.
Camera Position A (green line is going straight up to the sky)
Camera Position B:
If I understand correctly, for camera.flyTo I need to know coordinates, where to fly and orientation or direction of the camera. The thing is I’d need this generic, so if I click on any point on Earth, camera will fly to position B as shown in the picture. So the Earth is on left side of screen and the clicked point is at the rightmost edge of the Earth.
Does anybody have some hints how to calculate parameters for camera.flyTo in order to achieve this?
Thanks a lot for any kind of help