Rotating Main Camera

Hi,

I’m using a First Person Controller. What I wish to accomplish is to look around corners by pressing the Q/E buttons.

I thought this would be simple by changing the Z-rotation from the Main Camera to 10.0 but that doesn’t seem to do anything. Even if I change it in the inspector itself, it does show the change in the Game view but it doesn’t when I hit play.

Any idea’s?

Could something like this work?

       if (Input.GetKeyDown(KeyCode.Q))
		{
			transform.RotateAroundLocal(Vector3.forward, 0.2f);		
		}
		if (Input.GetKeyUp (KeyCode.Q))
		{
			transform.RotateAroundLocal(Vector3.forward, -0.2f);
		}