Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

objects have different coordinate stuff when the game starts

Discussion in 'Editor & General Support' started by kevinlettuce, Jun 19, 2014.

  1. kevinlettuce

    kevinlettuce

    Joined:
    Jun 19, 2014
    Posts:
    7
    disclaimer: i'm really new to unity

    ANYWAYS

    here's my problem:


    a couple of the ingame objects have different positioning info when the game starts, which carries over to the editor

    when i stop the game, they go back to being oriented how i want them to be. i can't play the game with them in the right spot though.

    i sort of just would like to know what this means and how i could fix it. thanks
     
  2. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Is there an animation on them that moves the root transform?
     
  3. kevinlettuce

    kevinlettuce

    Joined:
    Jun 19, 2014
    Posts:
    7
    i haven't animated any of the objects that are showing up in different locations; every object is just one nonmoving model. i also don't know what the "root transform" is, though?

    i have done zero scripting
     
  4. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    The root transform is the first transform on an object (some have multiple transforms such as bones). Look at the object in the hierarchy and see if it has an animation component with "Play Automatically" checked. If so, either uncheck that or simply remove the animation component if you aren't planning on animating it later.

    You can also drag it from the Project tab to the Hierarchy tab which places it in the scene in the default position and then create an empty game object to parent it to and move the empty, that way any root transform animations won't actually move it anywhere.

    Scripting has nothing to do with this as it is all internal functions of Unity.
     
  5. kevinlettuce

    kevinlettuce

    Joined:
    Jun 19, 2014
    Posts:
    7
    oh wow yeah i unchecked the animation component and it shows up correctly ingame now

    THANK YOU! you're great

    does anyone know why the animation component reorients it though because i'm trying to understand this