- Home /
Why is a added GameObject never at Position 0,0,0 ?
When you add a GameObject in the Editor to a Scene(Menu>>GameObject>>Create Other>>XYZ) it is never on Position 0,0,0 ! You always need to correct that by hand in the Inspector.
So whats the reason for that behavior and how to avoid it, and add the GO always to Position 0,0,0 ?
Thanks GameGuy
Answer by wibble82 · Jul 22, 2014 at 04:13 PM
I think it creates them near where the camera is. The idea being that if you're working on a bit of a scene that is nowhere near the origin (0,0,0) then creating a game object should create it near where you're working.
Specifically the object is created at the camera's pivot point. If you select an object and press F (sets the camera's pivot point to the object's pivot point), then create an object, the new object will be in the same place as the F'd object.
@wibble82 Yep this is a nice solution and it make sense. The tip from Lois is great and solves my problem so I will mark your answer as the right one. Thank you guys!
Answer by eskivor · Jun 01, 2021 at 01:23 PM
In new versions of Unity, since Unity 2020.2, they finally added an option to enable this behaviour (initial empty object position at (0, 0, 0)).
In the Unity Editor, open the Preferences window (Edit -> Preferences) Go to the 'Scene View' tab then in the 'General' section, click on 'Create Objects at Origin' and voilà.
If you don't have this option because you're working with an old version, you can still download the plug-in I published : https://assetstore.unity.com/packages/tools/utilities/empty-at-zero-creator-97576