Hi everyone,
I’m working on a Three.js project where I want to load a 3D Earth model and move the camera based on the selected latitude and longitude. The goal is:
My main challenge is how to find the exact location on the 3D model of the sphere.
I have some lat long position in the real world in earth as location.
The user selects a location (from the menu or by clicking).
The camera slowly moves to that position.
The selected area is centered in the viewport.
I assume I need to convert the lat/lon to 3D coordinates, but I’m not sure about the best approach. Should I use GSAP, Tween.js or just manual interpolation to move the camera smoothly? Also, should the camera move in a spherical path or straight?
I’d love to hear your feedback! Any suggestions or code snippets would be greatly appreciated.
Thanks in advance