# Finding the direction an object is moving and giving it a destination

I have an object that is lerping towards a vector2 and I want to find out the direction it is travelling and then pass it a new vector2 target to lerp to that is the same direction of travel, but just a shorter distance.

Any help would be much appreciated. Thanks in advance

You can use Vector2.Lerp():

``````var newDest = Vector2.Lerp(currentPosition, oldDest, 0.5);
``````

This will find a position half way between the current position and old destination. You can calculate it by hand as well:

``````var newDest = currentPosition + (oldDest - currentPosition) * 0.5;
``````

If you need it a specific distance from the current position, you can do:

``````var newDest = currentPosition + (oldDest - currentPosition).normalized * distance;
``````

If the distance is shorter or equal to the destination, and you want distance, you can do:

``````var newDest = Vector2.MoveTowards(currentPosition, oldDest, distance);
``````