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

Camera Rotation vs. World Rotation Introduces Pixel Jitter/Shimmer

Discussion in 'Editor & General Support' started by CreatureWithoutSpecies, Nov 3, 2021.

  1. CreatureWithoutSpecies

    CreatureWithoutSpecies

    Joined:
    May 10, 2020
    Posts:
    5
    A while ago I started porting a 2D project into 3D in Unity. I was able to maintain the traditional orthographic overhead view by rotating the world 45 degrees and stretching it by Sqrt(2) a la Enter the Gungeon.

    This works great and the pixels remain steady and consistent:



    However, this has required a number of hacks and workarounds since Unity really wants the Y axis to be straight up and down. As I'm experimenting with things like Terrain and NavMesh I foresee increasingly difficult/impossible hacks and workarounds to keep this setup working.

    But! When I rotate the camera 45 degrees and keep the world flat, the pixels start shimmering/jittering (most obviously seen in the video below in the blinds to the upper left, but also in the bricks and the bushes):



    The relation of the camera and the world is the same in both instances - the only thing that changes is which one is rotated. I'm using Pro Camera 2D but I've also tried Cinemachine, both with their pixel perfect extensions, and the shimmer/jitter is present with both in this configuration.

    Does anyone know why rotating the camera vs. the world introduces these errors, and is there any workaround?
     
  2. vadimtihonyuk

    vadimtihonyuk

    Joined:
    Feb 26, 2018
    Posts:
    32
    This could be because of scale of object in world space