Quantcast
Channel: Latest Questions by MasterBLB
Viewing all articles
Browse latest Browse all 44

Centering to main camera a clicked point on sphere

$
0
0
Hi again First the background-I have a sphere which I rotate horizontally in local space and vertically in world space. Now I'd like to rotate my globe that clicked by mouse point was directly before Camera.main.forward. I find such: http://answers.unity3d.com/questions/21921/rotate-point-a-on-sphere-to-point-b-on-sphere.html but that gives me incorrect results :/ So I started to develop own solution,which is find the angle between center and clicked points around OX and OY,then make Rotate(angleX,0,0) and Rotate(0,angleY,0). Well,but there is a problem-how can I find those angles?I found only Vector3.Angle(),but this gives me idiotic results :/

Viewing all articles
Browse latest Browse all 44

Trending Articles