title: Unity3D transform position movement with GetAxis
body: <p>I have implemented a click 2 move script and i'm trying to use a method that already gets a Vector3 of where I clicked and moves the player via CharacterController to it.</p>
  
  <p>is there a way to take the transforms current position, get the values from GetAxis while the keys are down and calculate its new position. when the vertical/horizontal controls are release the Vector3 would be assigned the transforms current position so it will stop moving</p>
  
  <p>the is what is used to move to the position.</p>
  
  <pre><code>void MoveToPosition()
  {
      if (Vector3.Distance(transform.position, position) &gt; 1)
      {
          Quaternion newRotation = Quaternion.LookRotation(position - transform.position);
          newRotation.x = 0f;
          newRotation.z = 0f;
          transform.rotation = Quaternion.Slerp(transform.rotation, newRotation, Time.deltaTime * 10);
          controller.SimpleMove(transform.forward * speed);
          animation.CrossFade(run.name);
      }
      else
      {
          animation.CrossFade(idle.name);
      }
  }
  </code></pre>
  
  <p>position is assigned from a raycast so I would like to use the players current position, what ever the calculations are required with getaxis and adjust accordingly </p>