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

2D Camera - Preview is not working

Discussion in '2D' started by Salade_de_poney, Jan 20, 2017.

  1. Salade_de_poney

    Salade_de_poney

    Joined:
    Jan 20, 2017
    Posts:
    60
    Hello everyone,

    I wanted to use unity for one of my project and I already face my first problem: I cannot see anything through the preview.
    I found no answers online :(

    I tried to recreate the camera,change position, change few setting but nothing can make it work. Here is a picture of my current settings:

    http://imgur.com/a/k5mEC

    Thank you for helping me !
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,988
    Camera Z is 0, try if you make it -10 or so?
    (maybe that's why it cannot see those objects that are also in z=0)
     
    theANMATOR2b likes this.
  3. Salade_de_poney

    Salade_de_poney

    Joined:
    Jan 20, 2017
    Posts:
    60
    How come I missed that part... Thank you very much
     
  4. DemonStray

    DemonStray

    Joined:
    Nov 19, 2016
    Posts:
    2
    Didn't want to make a new thread, as my issue is somewhat relevant to this topic.

    I was having some trouble earlier that resulted from the Z value of the camera being at the same Z position as other objects, but I quickly fixed that. However, to my knowledge, changing the Z position of the 2D camera was never supposed to change the size of sprites, was it? I've watched some videos of people creating simple 2D games in Unity (pre-5.6, not sure what versions) and the Z value only ever seems to determine its own sorting layer, essentially, without ever appearing to zoom in or out in distance. My issue is that as I decrease the Z value, it actually zooms out and as a result, it's become nearly impossible for me to get assets to appear organized at all; I find it ugly when my test scene's camera cuts off in the middle of a "pixel" on what's supposed to be a piece of pixel art.

    Anyone familiar with this, and got any advice? Sorry I don't have any screenshots, I'm timid of sharing images of what I'm working on. ;)
     
  5. RockyWallbanger

    RockyWallbanger

    Joined:
    Mar 16, 2014
    Posts:
    85
    It sounds like your camera is set to perspective. An orthographic camera won't scale the sprites. For the record, neither will a perspective camera, it's just that your viewing the sprite from closer or further making it appear smaller or larger.
     
  6. DemonStray

    DemonStray

    Joined:
    Nov 19, 2016
    Posts:
    2
    Oh boy, I'm like 99.9% sure you're right. It was only the second or third time I've ever opened Unity, so it makes perfect sense that I'd make such a rookie mistake ahaha.
     
  7. jeffthoms321

    jeffthoms321

    Joined:
    Apr 26, 2017
    Posts:
    13
    Its happens first time when we use 3d and 2d tools thats why camera is most important part of it