I’m using the below code to control the camera in my FPS controller but it only works on one axis. If I comment out the third line it works on the horizontal axis, otherwise it only works on the vertical. How can I get it to read both?
verticalLookRotation = Mathf.Clamp (verticalLookRotation, -80, 80);
horizontalLookRotation = Mathf.Clamp (horizontalLookRotation, -80, 80);
cameraT.localEulerAngles = Vector3.left * verticalLookRotation;
cameraT.localEulerAngles = Vector3.up * horizontalLookRotation;