title: Moving a 2d object towards and through a position in Unity 4.3
body: <p>Trying to get an object to fire towards and through a given position. Like a bullet firing towards the mouse location, I don't want it to stop on the mouse (which is what is happening now).</p>
  
  <p>Below is what I have so far, is there a function like lerp that I could use?</p>
  
  <pre><code>var speed:float;
  var startPoint:Vector3;
  var startTime:float;
  var clickedPosition:Vector3;
  
  
  function Start()
  {    
       startPoint = transform.position;
      startTime = Time.time;
      clickedPosition = Vector3(Input.mousePosition.x, Input.mousePosition.y, 0);
      clickedPosition = Camera.main.ScreenToWorldPoint(clickedPosition);  
  
  
  }
  
  function Update ()
  {
  
   transform.position = Vector3.Lerp(startPoint, clickedPosition, (Time.time-startTime));
  
  }
  </code></pre>