title: tap detection on a gameobject in unity
body: <p>i'm currently making a soccer game.</p>
  
  <p>In this mini-game, when the player touch the ball, it adds force, and the goal is to make the higher score.</p>
  
  <p>So i wrote:</p>
  
  <pre><code> void Update()
  {
      if(Input.touchCount == 1 &amp;&amp; Input.GetTouch(0).phase== TouchPhase.Began)
        {
         AddForce, and playsound ect...
        }
  
  }
  </code></pre>
  
  <p>With this, when i touch anywhere on the screen, it adds force, but i just want to add force when i touch my gameobject (the ball).</p>
  
  <p>How can i do that?</p>
  
  <p>Thanks! :)</p>