Imagine a globe (sphere). I have Point A (Miami FL) and Point B (Portland OR). I would like to rotate the globe so that:
I have been using Quaternion.FromToRotation but I have not been able to come up with a good solution.
I hope i understand it right. If so i had a similar problem yesterday.
I used this:
Also instead of using a Vector you rotate it should work if you use the rotation on a transform.rotation of a GameObject.
So i played around a little bit. I added one sphere in the middle of my scene, and two cubes.
was the function which helped me, it worked for me but im not sure if this is the best way to do it
I think you are on the right track with FromToRotation.
for the following to work your sphere would have to be at global (0,0,0)
if your sphere is not at global (0,0,0) you need to make sure that pointA and pointB relative to the sphere coord system and then use the following:
answered Jul 09 '10 at 11:11 PM
cnc guy helped answer my question. This is the code I ended up with. It allows a user to grab a point on a sphere and rotate the sphere from that point.
answered Jul 13 '10 at 09:46 PM