- Home /
Impossible to rotate child using parent rotation gizmo
Hi all,
I've been running into a small issue whilst trying to make a door animation to have it swing open and close.
I noticed that when you create an empty game object and add to it a child which has a position offset with respect to its parent. When you click on the parent GO in the hierarchy, the rotation/position/scale gizmos showed to you in the scene view are that of the child. Which means that I can't simply animate by using that gizmo, I have to manually edit the values of rotation in the transform component of the parent in the inspector.
As you can see on the figures below, the bucket is the child object, the parentobject position is the red dot. The child is offset from the parent by 1.5 units.
1) is what I can see in my scene view when I select the parent in the hierarchy. (I would expect the gizmo to be center on the red dot, i.e. the parent transform).
2) is what I want to achieve, but I can only get that result by editing the x rotation value manually in the transform inspector of the parent
3) is what I get when I use the gizmo in the scene view, as you can see it actually rotates the child not the parent, despite what I clicked on in the hierarchy.
Does this only happen to me ? Have I messed up my settings ? I find it confusing and hard to use since having a parent game object is often use to create movements relative to a point.
Any help welcome.
Answer by Halfbiscuit · Mar 24, 2017 at 12:33 PM
It sounds Like what you need is these pivot and transform space toggles in the top left. The center option ignores the parents position (if it is an empty object), and displays the pivot based on any child meshes.