Search Unity

Question Split screen with 2D Pixel Perfect Cameras Possible?

Discussion in '2D' started by laurenceSaleh, May 23, 2023.

  1. laurenceSaleh

    laurenceSaleh

    Joined:
    Apr 24, 2017
    Posts:
    6
    Imagine a sprite goes up to a vending machine in a top down perspective. Presses an action button. Then from below a zoomed in view of the vending machine pops up in a 3D perspective.. (still 2d pixel art) from the bottom of the screen and the original view just slides up smoothly. I now have a split screen affect showing the original view of the top down world and a new view of a detailed vending machine where I can select what I want.

    I can achieve this using two cameras WITHOUT pixel perfect camera components attached. I simply change the viewport rect of the cameras from 0,0,1,1 to (0,0.5,1,0.5) and (0,0,1,0.5) and adjust the orthagraphic size a little so it is more zoomed in.

    Why cannot I change the viewport rect of the pixel perfect camera. It automatically snaps the viewport rect back to 0,0,1,1 and ruins my affect. Without the pixel perfect camera I get artefact line appearing in the middle of the screen when the cameras are moving.

    Does anyone have any ideas how this kind of affect can be done using pixel art and maintaining a good visual look with no artefacts?!
     
  2. karderos

    karderos

    Joined:
    Mar 28, 2023
    Posts:
    376
    dont use pixel perfect if you need to change the zoom

    remember all old games, it was always the same zoom, like pokemon, super mario, zelda, sonic, etc