1
\$\begingroup\$

It seems that my objects drop to the middle of the scene, not a global position of (0, 0, 0).

Why is Unity behaving like this?

\$\endgroup\$
  • \$\begingroup\$ This might seem like a very basic question; but I see so many users make mistakes from assuming it will drop objects to an origin position. \$\endgroup\$ – Gnemlock Apr 29 '17 at 12:35
2
\$\begingroup\$

When you drag an object into your scene, Unity attempts to place it exactly where you drop it. This can be an unreliable way to position objects, especially if you are working in 3D space. When you create a game object by selecting from a menu in the hierarchy, there is a clear attempt to position the game object at an origin position of Vector3(0, 0, 0); even in this case, the results can be unreliable.

It is always important to double check the position of your game object, upon creation. You can do this in two ways. You can directly reset the position values to 0, or if you have no rotation and a default scale, you can simply reset the transform all together. You can do this by clicking on the cog to the top right corner, and selecting "Reset". You can also select "Reset Position" from this menu, if more convenient.

In no time at all, this practice becomes pretty standard. It might be annoying, at first, but you will get use to it.

"Reset" is the top option under the Transform options; "Reset Position", "Reset Rotation" and "Reset Scale" are listed at the bottom.

| improve this answer | |
\$\endgroup\$
-1
\$\begingroup\$

Unity doesn't do this, because it's not just an interface for you to drop your objects into. It's also a visual level design tool and your camera is important in that regard.

You probably wouldn't want all your objects to be dropped into (0, 0, 0) in a universe where you need them to be somewhere like (1253, 324, -2432) because that would mean you'd either have to look towards origin and move them by hand or enter some arbitrary coordinates to set their position so that you can do adjustments.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.