- Home /
Empty Parent GameObject Moving with Child
Hello,
I am running into an odd issue with parenting Empty Game Objects. When I move the child GameObject, the parent's position is affected by the child's position. For example, I have a parent and child sitting at [0,0,0]. If I move just the child to [2,0,0] the parent will now appear at around [1,0,0].
If I look at the parent in the inspector, it says it is still at [0,0,0] but in the editor, it clearly is not.
Example:
Start with parent/child at [0,0,0]:
Now, I move the child to 2 in the x axis (top half of image).
If I select the parent now, it still claims to be at [0,0,0] but in the editor it has clearly moved off the origin (bottom half image).
Note: None of this is an issue when using Cubes or the other shapes.
Is this excepted? Is it a known issue? Is there a way around it?
Answer by whydoidoit · Sep 15, 2012 at 11:20 PM
It is caused by the fact that you have "Center" set as the movement position in the toolbar (next to global). When that is set the gizmo is drawn at the centre of the structure of the children - set it to pivot and it will be where you expect.
Thanks $$anonymous$$ike. I didn't think of that! Weird that this isn't the case when using non-empty game objects.