Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help setting up the Pixel Perfect camera (2019.2)

Discussion in '2D' started by kukurenaiz, Mar 27, 2020.

  1. kukurenaiz

    kukurenaiz

    Joined:
    Sep 12, 2017
    Posts:
    57
    Good night, after some research, I couldn't make the pixel perfect camera work the way I wanted on my project, I think the reason is due to my lack of understanding what the camera should be doing. Initially, I thought that it would just render my sprites pixel-perfectly, not sure how. It wouldn't matter that much if the setup was as straightforward as it seemed, but it isn't.
    The game looks like this.
    zxcvzxcvzxcvxzvzxcv.PNG
    I was expecting my sprites to be render pixel perfectly, like the image below from a video by Mix and Jam
    upload_2020-3-26_21-7-59.png

    But there's no possible reference resolution that would achieve this with my PPU of 16, every sprite is set to 16 PPU, if I set to low reference resolution, every sprite becomes a single pixel (image below)

    (RR: 116 by 66, random value)
    upload_2020-3-26_21-20-54.png

    If I set reference resolution to something high, the camera scales in such a way I can see the whole game map, which makes sense? I guess? I don't know how this camera works! (image below)

    (RR: 320 by 180, default values)
    upload_2020-3-26_21-26-16.png

    Can someone cover me on this? How the pixel-perfect camera works, what each value does, and, if possible, what should I to achieve the desired effect.
     

    Attached Files:

  2. kukurenaiz

    kukurenaiz

    Joined:
    Sep 12, 2017
    Posts:
    57
    Just noticed this old question, the problem was the Pixel Perfect Camera itself, I was using URP, which has its own 2d Pixel Perfect Camera solution, not the same from the package manager.