Search Unity

Cinemachine and Pixel Perfect Camera

Discussion in 'Cinemachine' started by zapposh, Jul 30, 2019.

  1. zapposh

    zapposh

    Joined:
    Nov 12, 2016
    Posts:
    117
    I have a 2D system of rooms, basically a set of confiners that also works as triggers to activate a Vcam depending on what room the player enters.

    Besides a problem I have encountered which is mentioned here: https://forum.unity.com/threads/i-w...screens-like-how-they-used-in-celeste.717446/

    ,I have some other issues:

    Parallax when using Cinemachine and Pixel Perfect
    How can I get a simple parallax scrolling to work? Is there an Extension for this on the way?
    The Unity pixel perfect extension uses orthographic cameras as the size is calculated depending on output resolution, and "freezes" this parameter in a Vcam. In other words, changing the camera & vcams to perspective mode is not a solution and the effect needs to be generated using ortho cams.

    Camera size/bounding volume calculated at runtime (1:1, 2:1, 3:1, 4:1 ratio of base output resolution etc)
    The second issue is more linked to the concept of Pixel Perfect, but impacts the way Cinemachine works.
    Since camera size is calculated at runtime depending on output resolution and ratio, the new bounding volume can be bigger than the initial confiner 2D Colliders, leading to jumps in position.
    More leeway in the confiners is not a solution, as the player would then see areas he is never meant to see in certain resolutions.
    I'm aware there is no "one size fits all" in this case, but if someone has ran into similar issues in the past, ideas would be welcome, thanks.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    There's no real solution to your first issue, other than trying to simulate that effect by moving different layers at different speeds.

    There is a new pixel perfect extension coming with 2019.3 that should be able to fix the second issue. It will be shipped as part of the PixelPerfect package.
     
    zapposh likes this.
  3. zapposh

    zapposh

    Joined:
    Nov 12, 2016
    Posts:
    117
    Ok, many thanks for your help.