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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Pixel Perfect Camera and different resolutions

Discussion in '2D' started by shaste, Dec 16, 2019.

  1. shaste

    shaste

    Joined:
    Jan 5, 2018
    Posts:
    2
    I'm trying to make a scrolling shooter with pixel graphics and I can't find a single tutorial on how to fully configure the camera. For crisp pixels, I use Pixel Perfect Camera package.

    Here are my questions:
    1. How to configure the camera for different screen resolutions? The attachment shows how with different screen resolutions you can see either more or less than needed.
    2. How to choose the right reference resolution and PPU?
    3. Is it better to scroll the level itself or move the player with the camera?

    Thanks in advance. Happy holidays!
     

    Attached Files:

  2. shaste

    shaste

    Joined:
    Jan 5, 2018
    Posts:
    2
    I found a working solution, so I answer my questions:
    1. Crop Frame option solves this problem, but adds letterboxing. I don’t know if it's possible in my case to find a more accurate way.
    2. I chose the reference resolution based on height, because I have it fixed. For possible options google "List of True 16:9 Resolutions". For a tile game, the PPU must match the size of the tile. I chose 32 because it's the closest to the size of my assets.
    3. It’s technically easier to scroll the level, because you don’t have to think about the speed of the player and enemies for the correct speed of bullets, particles, etc.

    I would be glad if someone gives additional information about all these things.