Parallax background is jittery while camera follows player

Hello,
I’m having an issue where the background is jiitery while camera is following the player. The character is correctly displayed (no blurry no jitter).
I’ve tried many solutions but nothing works. The jitter is still present.


Here is my player movement script :

private float move;
public bool controlsEnabled;
Rigidbody2D rigidbody2d;
private float maxSpeed = 5f;

  void Update()
    {
        if (controlsEnabled) {
            move = Input.GetAxis("Horizontal");
        }
    }
    private void FixedUpdate() {
   
            rigidbody2d.velocity = new Vector2(move * maxSpeed, rigidbody2d.velocity.y);
     }

I’m using pixel perfect camera > 32 PPU (ref res X 480 Y 320)
162125-cinemachine.png
Cinemachine brain with Fixed Update for the Update Method. (with cinemachine pixel perfect extension)
All sprites are imported with good practices for 2D pixel art, I mean Point (no filter) etc…


Here is my parallax script for the background :

public class Parallax : MonoBehaviour {

    private float length, startpos;
    public GameObject cam;
    public float parallaxEffect;


    
    // Start is called before the first frame update
    void Start()   {
        startpos = transform.position.x;
        length = GetComponent<SpriteRenderer>().bounds.size.x;
        
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        float temp = (cam.transform.position.x * (1 - parallaxEffect));
        float dist = (cam.transform.position.x * parallaxEffect);
        transform.position = new Vector3(startpos + dist, transform.position.y, transform.position.z);

        if (temp > startpos + length) startpos += length;
        else if (temp < startpos - length) startpos -= length;

    }
}

I’ve tested pixel perfect camera version 2.0.3 & 3.0.2.
Did anyone meet the same issue ?

Thanks

I’m not sure if it is a good solution or not but in my case when I’m put parallax code in FixedUpdate solved the problem.

Put your camera follow script in LateUpdate(), it will update after the player has moved then

Static player and camera that follows the player. Player is the only stationary object in this game. Parallax background and foreground. Objects such as monsters, obstacles and loot which are set to move at equal speed relative to the ground. A pool manager that collects all objects that moved out of the screen.

Static player and camera that follows the player. Player is the only stationary object in this game. Parallax background and foreground. Objects such as monsters, obstacles and loot which are set to move at equal speed relative to the ground. A pool manager that collects all objects that moved out of the screen.

Hello, did you solve this? I have the exact same problem at the minute!