I have the following line in a script on cubes that are spawned as children on the surface of a sphere.
transform.RotateAround (Vector3.zero, -Vector3.up, -5);
It works relatively well however I want the cubes to rotate around an axis parallel to their forward vector that goes through the center of the sphere they are on. I tried the following
transform.RotateAround (Vector3.zero, transform.forward, 5);
This makes the cubes rotate about an axis going through THEIR center and doesn’t move them along the sphere.
With the second approach I feel that the behavior of RotateAround is somehow changing. Regardless of where the cube is on the sphere they are only rotating about their own axes.
Am I missing something about how this works? Please let me know if I can clarify.