rotation = Quaternion.identity doesn't change x rotation

So yeah, I have a camera, I want to be able to press a button to centre it. Setting its rotation to Quaternion.identity sets its y and z rotations to zero, but leaves its x rotation unchanged. The same happens if I set it to Quaternion.Euler(0,0,0). What the hell?

Ah, the camera is controlled by the ‘MouseLook’ script that comes with Unity. MouseLook maintains a private variable corresponding to x rotation between frames. It maintains this so that it can keep the camera from looking too far up or down. So I’ll need to set this to zero when I centre the camera.

Thanks to Imtiaj Ahmed for drawing my attention to this.