Why my camera trembling when i rotate it?

I’m creating a script to control my camera and my character on a unity scene but when I turn my camera with my mouse, the background tremble. But the more I turn, the more my background tremble.

public Camera FPSCam;
    void Update()
          yaw += speedH * Input.GetAxis("Mouse X");
          pitch += speedV * Input.GetAxis("Mouse Y");
          transform.eulerAngles = new Vector3(0.0f, yaw, 0.0f);
          FPSCam.transform.eulerAngles = new Vector3(pitch, yaw, 0.0f);

I already tried many thinks to fix my bug like change the Update() by a FixedUpdate() or use a Vector3.smoothDamp() to update the transform.eulerAngles.

You can download build project following this link:


Thanks for help.

PS: please, excuse my English level, I’m french…

use the update, and rather than changing the rotation, you should be rotating towards the desired rotation.