Search Unity

Bug 2D jitter/lag during cam movement

Discussion in '2D' started by antonsenlarsen, May 4, 2023.

  1. antonsenlarsen

    antonsenlarsen

    Joined:
    Nov 20, 2020
    Posts:
    4
    Hi!

    I've been working on my 2D ARPG for about a month now and I'm struggling with this jitter and lag on objects when camera is moving. Both on static objects and my character. It even happens when not in play mode and just moving camera manually in the editor. When I build the game its equally bad. Creating a new project make no difference.

    Troubleshooting history:
    - Made 5 different camera scripts for moving the camera, with everything from smoothdamp to lerp to transform.position to even applying a rigidbody onto the camera and used physics to move it. Tried Update, Fixed Update, Late Update.

    - Many different character controllers with everything from addforce to kinematic movement. Interpolate, extrapolate.

    - Imported sprites PPU 16, 32, 64, 100.

    - Cinemachine, every single setting tested I think.

    - Watched probably 50 videos on cam settings

    - Probably all Post-Processing settings.

    - Pixel perfect, all settings. (it makes character lag and jitter instead of the static objects)

    Nothing helps. The only thing that alleviates the issue is changing the orthographic size of the camera to something that on paper should be less ideal. 8.4375 should result in a clean picture with my 64 ppu full hd right?? this is what pixel perfect tries to force, but when I use PP my character jitter, and when I do not use PP and set 8.4375 my static objects jitter.

    This is a recording showing the issue:



    If you look closely you can see that the trees are jittering/moving up and down when camera is moving at a slow speed. And when I change orthographic size they stop moving up and down and jitter is reduced.
     
    Last edited: May 5, 2023
  2. antonsenlarsen

    antonsenlarsen

    Joined:
    Nov 20, 2020
    Posts:
    4
    Last edited: May 5, 2023