title: How to detect touch on a game object
body: <p>I'm developing a game on Unity for iOS devices. I've implemented the following code for touch:</p>
  
  <pre><code>void Update () {
      ApplyForce ();
  }
  
  void ApplyForce() {
  
      if (Input.touchCount &gt; 0 &amp;&amp; Input.GetTouch (0).phase == TouchPhase.Began) {
          Debug.Log("Touch Occured");     
      }
  }
  </code></pre>
  
  <p>I've dragged this script onto my game object which is a sphere. But the log message appears no matter where I touch. I want to detect touch only when the users touches the object.</p>