I’m trying to rotate a GameObject that consists of several cubes around y-axis of its center of gravity using a script (Picture 1). However, it’s rotating around its pivot point when I use transform.Rotate() (Picture 2). Is there a way to make it rotate around the point in Picture 1?
You probably just want to change the “pivot” of the parent object. Which means change the parent object’s position and adjust the child objects’ positions accordingly: