So, as a beginner, I followed this tutorial about developing a first person camera, and there the person used a clamp to limit the vertical rotation of the camera to 89 ad -89 degrees. Well, when I tried that out when I slightly move my mouse, all I see is the screen flickering between the sky and the blue horizon as if my sensitivity is super high and the mouse is automatically moving.
Here is a screenshot of my code:
This problem occurs only when the clamp line is present, other than that it works as intended (well, except for the vertical camera limit).
I'd be grateful to any kind of help provided