title: Unity C# camera zoom script
body: <p>So before I explain my problem. I will first tell what I am really doing.
  I am working on a click to move/zoom camera script. There are 3 planes in front of my Main Camera. Now what I am doing is, creating a script which says " The camera will zoom on the plane which gets clicked. I made several attempts to come up with a working script but it didn't worked well. Every time I come across new bugs , errors and what not. :|
  I got frustrated and deleted the buggy script. Now I want to start from scratch. I am doing it in C# </p>
  
  <p>Since I am not a professional, Can anyone explain me in detail to get it done?
  I am confused how to deal with the planes I placed. I want to know what is missing in my script. 
  Here is a screenshot of how I placed those planes. </p>
  
  <p><img src="https://i.stack.imgur.com/WxHoC.png" alt="enter image description here"></p>
  
  <p>Edit. - I managed to work on it. Now I need advice, how to target the planes I placed in front of the camera. </p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class CameraZoom : MonoBehaviour
  {
      public int zoomLevelSelected = 0;
      public float[] ZoomLevels = new float[] { 60, 40, 20 };
      void Update()
      {
          int zoomChange = 0;
          if (Input.GetMouseButtonDown(0)) { zoomChange = +1; } // back
          else if (Input.GetMouseButtonDown(1)) { zoomChange = -1; } // forward
          if (zoomChange != 0)
          {
              zoomLevelSelected = Mathf.Clamp(zoomLevelSelected + zoomChange, 0, ZoomLevels.Length - 1);
              camera.fieldOfView = ZoomLevels[zoomLevelSelected];
          }
      }
  }
  </code></pre>