Threejs: Rotate Sphere(globe) To Another Point(city) On The Sphere Itself
I'm building a globe(sphere geometry) with set of predefined locations on geo-mapped and drawn as point(sphere geometry). I would like to focus(moving one location to another) thos
Solution 1:
var c = group.rotation.y;
var d = -b * (Math.PI / 180)%(2 * Math.PI);
var e = Math.PI / 2 * -1;
group.rotation.y = c % (2 * Math.PI);
group.rotation.x = a * (Math.PI / 180) % Math.PI;
group.rotation.y= d+e;
where a= latitude, b= longitude,group=Object3D(or sphere)
Post a Comment for "Threejs: Rotate Sphere(globe) To Another Point(city) On The Sphere Itself"