I have a DoorSprite
with an Animator
component which I animate by rotating it by 90 degrees (makes the door look like opening around a hinge).
The parent, Door
, is empty and only holds the DoorSprite
child GO.
To achieve the hinge effect, I've set the pivot of the door sprite to the left side. I now want to rotate the parent but the problem is that all the children inside the parent rotate too, but not by the parent's pivot (which is center), but by their pivot.
This is the Door
parent before rotation:
When I rotate the Door
parent by 90 degrees, this is what I want to achieve:
However, this is what actually happens (the sprite pivot (hinge) is marked with the arrow):
How can I rotate everything by the pivot in the center, regardless of child pivots?