2
\$\begingroup\$

I create a game object, add some children to it, and would like the pivot point of the parent to be somewhere inside the area occupied by the children, not far away in the scene.

Like in the example below, I have three blocks of platforms situated near each over. I add them into a parent, then try to move that parent and notice that the origin point of the parent is actually not somewhere between its children, but outside them on the upper right:

Image showing transform gizmo on pivot well outside the child area

Does someone know a way to change the origin point in such case?

\$\endgroup\$
4
  • \$\begingroup\$ One of the ways to fix it is to tweak the transform component of the parent. But it will cause a lot of mess in the coordinates which I prefer to avoid. \$\endgroup\$
    – some1 here
    Commented Jun 15, 2017 at 20:15
  • 1
    \$\begingroup\$ The only way to "recenter" things is to manipulate the transform. You have to remove the children, move the parent to the desired location, then add the children back. \$\endgroup\$ Commented Jun 15, 2017 at 20:22
  • \$\begingroup\$ When you click on one of the blocks, do you see the anchor in it's center or somewhere else? \$\endgroup\$
    – Jacob
    Commented Jun 15, 2017 at 20:35
  • \$\begingroup\$ @Spectre, when I click child block an anchor point is shown in a very convenient place, in the middle of the block. \$\endgroup\$
    – some1 here
    Commented Jun 15, 2017 at 20:42

1 Answer 1

5
\$\begingroup\$

The solution is straightforward.

First remove all the children from under the parent and put them somewhere else in the hierarchy temporarily.

Then move your parent's position to where you want it to be with respect to the children.

After that, move all children back inside the parent with the help of Hierarchy view.

Since the editor won`t move your objects in the Scene view if you make some changes in the Hierarchy view, the children will stay in the same net coordinates. So, after doing that you will get the origin point of the parent in any place that's convenient for you.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .