Search Unity

Which way is Left and which is Right?

Discussion in '2D' started by DoofusRufus, Jan 26, 2015.

  1. DoofusRufus

    DoofusRufus

    Joined:
    Nov 25, 2014
    Posts:
    5
    Hi,

    I'm starting a 2D game, and the first thing I notice is that the camera is placed by default at (0,0,-10) which suggests the camera is behind the view plane, not looking at the scene from the front. When I look through the camera and drag my sprites using the transform panel, negative x is to the left and positive x is to the right. But when I look at my scene, and tell the window to be looking from the "FRONT", negative x is to the right and positive x is to the left.

    Is there a reason for this? I started moving things around so that they made sense to me, then realized that there were implications, as vectors can be addressed as left, right, up and down, and forward and back. I don't want to get off on the wrong track right at the beginning. Is there some way to look at this that makes sense without having to stand on my head?

    I'm writing a top down asteroids like shooter game, and was able to ditch my top down approach in favor of thinking in terms of up, down, left and right. I'm not quite ready to say, okay - now I'm looking from behind and left is right, and right is left. Any suggestions?
     
    Last edited: Jan 26, 2015
  2. DoofusRufus

    DoofusRufus

    Joined:
    Nov 25, 2014
    Posts:
    5
    I just did a test with a basic cube and a plane in 3d, and I'm seeing the same thing. It just seems odd to me that the camera is placed at -10 z by default and not 10 z, and it seems the idea of left and right have been swapped to accommodate that awkward default placement. I see other people have asked about this, and the general response appears to be, "that's just the way it is."

    I suppose I can train myself to get used to this, but I still wonder if there's any way to correct for this in the settings somewhere. I'm also curious to hear about people's theories or stories as to how or why this has become accepted behavior!

    I guess I'd think twice about overriding settings which would make my scripts incompatible with other environments, so unless there's a commonly accepted approach to fixing this, maybe it's more important for me to simply accept things the way they are. Welcome to my moment of Zen!
     
  3. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    I'm actually interested in this as well.

    I just kept the camera where it was and continued with my game, but when I started working with angles I noticed that rotating a sprite clockwise resulted in a negative angle. Rotating it counter-clockwise game me a positive angle. This was the opposite of what I expected. And it's surely because of the camera in negative z looking at the scene "from the back".
     
    DoofusRufus likes this.