Implement a limit in Camera Movement

  1. declare a variable float heading;

  2. adjust it when conditions warrant:

if (conditionToTurn)
{
   heading += AdjustmentWhateverYouWant;
}
  1. clamp it
heading = Mathf.Clamp( heading, minimum, maximum);
  1. drive the rotation to the camera transform:
cameraTransform.localRotation = Quaterion.Euler( 0, heading, 0);
1 Like