title: unity moving an object to right/left side
body: <p>I am new to unity and I am trying to make a simple task: touch an object and then release your touch. when you release, I want to check in which side of the screen you released your touch and then move the object to that side of the screen.
  So if I am pressing on my object, then swiping my finger to thr giht side, the object will move left and same for the right side...</p>
  
  <p>This is my code, attached to the game object, and for some reason the object is just going to the right side of the screen. and it do it immidietly even though I used <code>Lerp</code>.</p>
  
  <pre><code>void OnMouseUp()
  {
      Vector3 pos = Input.mousePosition;
  
      Debug.Log("press off"); 
  
      if (pos.x &lt; Screen.width / 2)
      {
          transform.position = Vector3.Lerp(transform.position, new Vector3(0,0,0), 2f * Time.deltaTime);
      }
      else
      {
          transform.position = Vector3.Lerp(transform.position, new Vector3(Screen.width, 0, 0), 2f * Time.deltaTime);
      }
  }
  </code></pre>
  
  <p>thank you!</p>