Help getting perpendicular angle of point on sphere
Hey Guys,
I'm trying to figure out the rotation of an object placed around a sphere. Here is the sphere with the objects unrotated:
https://dl.dropbox.com/u/5257679/sphere_unrotated.png
I can get the Y rotation by just setting y rotation to -pi2 * xProgress + pi*0.5, seen here:
https://dl.dropbox.com/u/5257679/sphere.png
But I can't figure out the X rotation and I think the way I'm going about this is flawed. If I apply what I did for Y to X I get:
https://dl.dropbox.com/u/5257679/sphere_wrong.png
The center of the sphere is just 0,0,0, so the projected vector to the surface of the sphere is just the position where each face is placed (x,y,z).
Any ideas?
Thanks! -andy