Help getting perpendicular angle of point on sphere
I'm trying to figure out the rotation of an object placed around a sphere. Here is the sphere with the objects unrotated:
I can get the Y rotation by just setting y rotation to -pi2 * xProgress + pi*0.5, seen here:
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:
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).