transform.Rotate moves Object instead of rotating

I have a board (made by various objects) with objects on it and i want to rotate everything when i swipe the screen. So i’ve created an empty GameObject and put the board’s components as children. When i try to rotate the father with father.transform.Rotate(Vector3.up, Speed*touch.deltaPosition.magnitude) the object drifts away instead. Even if i manually change the X, Y or Z’s rotation value in the editor the object does move, not rotate. How so ? How can i actually rotate ?

This happens if you’re not careful about where the parent GameObject’s pivot point is located.

Try selecting the parent (empty) object, select Pivot (and probably Global as this is likely a top level parent), then find the pivot point.

If the pivot is in the center of what you intend to rotate, then I’m out to lunch.

Otherwise, if the pivot is in the wrong place, you need to change your plan a bit.

If the pivot of the parent is not in the center of the children, it’s probably way off out in no-where, and the rotation you’re observing as at the edge of a very large rotating space, which thus looks like it’s drifting left and right (the center of rotation is so far away you can’t easily detect the curve or the pivot center by this motion).

I’ve never found a way to change the pivot point of a parent in this situation without having to reorganize everything else among the children. What I do, instead, is to create a new empty parent, then locate that new parent at the center of the collection of objects you want to spin around this point, then reparent all the kids to this new parent, and abandon the old one.