title: How do I use touch control in Unity3d to destroy a single object?
body: <p>I am using </p>
  
  <pre><code>void Update()
  {`for (var i = 0; i &lt; Input.touchCount; ++i)
      {
          if (Input.GetTouch(i).phase == TouchPhase.Began)
          {
  
              // Construct a ray from the current touch coordinates
      Ray ray =      Camera.main.ScreenPointToRay(Input.GetTouch(i).position);
               if (Physics.Raycast(ray))
  Destroy();
          }
      }
  </code></pre>
  
  <p>}</p>
  
  <p>I tested on my mobile phone (Windows Phone) to see if I can touch my object to destroy. This script is also attached to the object, so when touched it should get destroyed. Instead, if I touch anywhere in the screen, all the objects, which is multiple duplicates of one object, gets destroyed instead of the specific one I touch. This does not happen when I use OnMouseDown. Is there something I can do similar to MouseDown with touch control?  </p>