title: Can you set max angles for RotateAround in Unity?
body: <p>This doesn't accomplish what I want really. It basically just rotates around an empty until it hits a max. When I use this code, it moves fine. The "maximum" angle changes based on which way you decide to move first. Is there a way to set a maximum rotate around angle?</p>
  
  <pre><code> using UnityEngine;
  using System.Collections;
  
  public class CameraMovement : MonoBehaviour {
      Transform rotAround;
      public float maxRotation = 0;
      // Use this for initialization
      void Start () {
          rotAround = GameObject.Find ("CamRotation").GetComponent &lt;Transform&gt; ();
      }
  
      // Update is called once per frame
      void Update () {
          if (Input.GetKey (KeyCode.D) &amp;&amp; maxRotation &lt; 52.0f) {
              transform.RotateAround (rotAround.position, Vector3.down, 100 * Time.deltaTime);
              maxRotation += 1;
          }
          if (Input.GetKey (KeyCode.A) &amp;&amp; maxRotation &gt; -52.0f) {
              transform.RotateAround (rotAround.position, Vector3.up, 100 * Time.deltaTime);
              maxRotation -= 1;
          }
      }
  }
  </code></pre>