Search Unity

Why the F'** Does Unity Place new gameObjects randomly somewhere in scene?

Discussion in 'Editor & General Support' started by khellstr, Sep 28, 2013.

  1. khellstr

    khellstr

    Joined:
    Feb 16, 2012
    Posts:
    72
    I'm getting totally frustrated about this. Every time I create new object, I either have to zero its position ( 0 key --> tab ---> 0 ---> tab 0) or move it somewhere I'd like it to be. Why can't unity just create new GameObjects to (0,0,0). In most of cases I want gameobjects to be child of some existing gameObject, and before drag and dropping it in hierarchy I usually have to zero position anyways.

    I have been playing with Unity occasionally for few years and haven't figured out how it chooses new GameOject places.

    // sorry for rant but I'm doing 15 mins job over again, because i forget to zero my "waypoint container" and can't figure out how to reset gameobjects position and rotation.
     
    Last edited: Sep 29, 2013
  2. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    Select the GameObject in the Hierarchy window, then in the Inspector window press the settings icon on the right next to the help button.
    There you can select reset position and rotation.
    You could also write an editor script to spawn the prefab where you want.
    And there is no reason to use this kind of language on a public forum, people tend to not help when you do.
     
  3. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I thought GOs were placed in the scene some distance in front of the (scene view) camera along its look at vector.
     
    Vea_Arthur likes this.
  4. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    Things mostly are created in the middle of the view for me. However, some third-party tools create objects off-camera. Not much UT can do about those, I guess. I've had plain GameObject instances created behind me too, so I guess it tries to keep Z at 0. One funny thing is that prefabs end up all over the place if I drag them straight into the hierarchy, and in particular Z can be all over the place (very noticeable in the case of 2D Toolkit projects).
     
  5. khellstr

    khellstr

    Joined:
    Feb 16, 2012
    Posts:
    72
    Sorry for language, I'm ashamed, got frustrated and angry about Unitys UI.
    // Edit: and it seems I cant change header/topic.

    Thanks for help, still not best solution but saves few clicks.

    Could it be possible to write script that search fbx file for certain named meshes/objects/locators and change them with something else that you define. There are softwares that in my opinion do 3D navigation and editing much better than Unity. It would be create if I could make and place copies of example trees in Modo/Blender, save fbx and run a script that would change tree meshes with tree Prefabs.

    Someday I will write polite rant about all the things that are wrong or could be done better in Unitys UI. I have used Unity since 3.something and there has been very few updates to UI, which I think is far from perfect.
     
    Last edited: Sep 29, 2013
  6. khellstr

    khellstr

    Joined:
    Feb 16, 2012
    Posts:
    72
    I have also thought something like that, but it feel that I have no control to that "some distance".


    That actually the thing frustrated me more than new GameObject placement. And often I forget that I could reset position in Inspector and end up zooming and moving sceneview back and forward.
     
  7. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    It never has for me. Mine always places it at the position of some previous object. It will keep using that same position for a few weeks, then something unknown will happen and it will chose a new position.

    Currently all my objects appear at 0.5, 0.61, 0. That was the position of some GUI Text (screen position of course) I removed about 10 days ago. But it is now the world position for all objects placed in 3D space. For a ages before that I had objects placed at 7502, 7440, 0, which had been the x,y position of one of the cameras in one of my projects.