Asset anchor point question

It’s strange to me that assets have a locked anchor at 0,0,0. I wanted to have sphere rotate around another like the moon around the earth. When I dropped one sphere as a child on another one the parent sphere now has it’s anchor point between the 2 spheres? it looks like it finds the middle between the objects.

When I tried to drop a sphere on top of a created GameObject so the sphere is the child of a GameObject the anchor point of the GameObject is snaps to the 0,0,0 of the child object?

This seems odd. I should be able to apply a sphere to a empty game object and have the anchor point not transform to the spheres position? If they would remain as an offset then I should be able to rotate the gameobject and have the sphere rotate around the gameobjet.

Whats going on here?

I don’t know what’s going on there. Unity works as you say it should: if you make the moon a parent of the planet, then you can position this moon wherever you want, and when the planet rotates, the moon rotates around it, as if they are one solid object. All works exactly as it should.

I don’t know what you mean by “the anchor point” of the GameObject. Every GameObject has a local position (relative to its parent) and a world position (relative to the global coordinate system), which is computed on the fly from its local position and the transform of its parent (and that object’s parent, etc., all the way back to the root). When you reparent an object in the scene editor, the local position is changed so that the world position stays put. The opposite choice would have been very confusing. But when you reparent in code, using Transform.SetParent, you can choose which behavior you want.

Hi JoeStrout, The terminology is different for me in here, but it looks like you understand the heart of my question anyway.

The Anchor Point is basically the center of an object when it is created. In C4D I could easily relocate this axis point. Creating an Earth and a moon sphere, I could drag the moon axis and relocate it without even having to parent them. So the moons axis point I could drag to the center of the Earth, then when I use the rotate tool on the moon, it would rotate around the earth.

I started a fresh project. I created 2 3D sphere objects and renamed them Earth and Moon. I then dragged the moon object on top of the earth object as a child. I took a still image of the screen for you to see the results of this Parent / Child relationship. When I select the Earth object (Parent), and you look at the photo, the Axis handle is between the earth and the moon. When I rotate the parent object, the 2 objects rotate around each other instead of the moon around the earth. But you can see in the photo with the parent object selected the Transform.Position is still 0.0.0. even though I can visually that RGB axis point is between the 2 spheres?

It seems that the ‘center’, axis point, is between those 2 objects. What am I missing here?

I found the solution by accident. There is a button on the top left called ‘Pivot / Center’ By selecting and deselecting this button causes the pivot point to relocate from the center of the parent object to the center of its of its own mesh.

Ah, I see. You were in “Center” tool handle mode. I never use that mode; I leave it set on Pivot, which makes a lot more sense to me (as it clearly does to you, too).

In “Center” mode, it computes a position for the tool handles based on the bounding box of the object and all its children. In “Pivot” mode, it keeps the tool handles at the actual position of the object.

Note that this is only a convenience for the scene editor; it has no bearing on where the object is actually located, or what values you would read in code (which are always the world or local position).

Thanks Joe. I was defaulted to Centered from the time I installed the program a few weeks ago. I ran through a few tutorial to familiarize myself with Unity3D but that never came up in the tuts. Thanks for your help!

1 Like