# How do I find a location between two vectors?

**URL:** <https://forums.unrealengine.com/t/how-do-i-find-a-location-between-two-vectors/381387>\
**Category:** World Creation\
**Tags:** timeline, distance, unreal-engine, vector, Blueprint, question\
**Created:** [January 9, 2017, 8:57pm UTC](https://forums.unrealengine.com/t/how-do-i-find-a-location-between-two-vectors/381387 "2017-01-09T20:57:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mewbits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mewbits/32/1194714_2.png) [@Mewbits](https://forums.unrealengine.com/u/Mewbits)\
**Post date:** [January 9, 2017, 8:57pm UTC](https://forums.unrealengine.com/t/how-do-i-find-a-location-between-two-vectors/381387/1 "2017-01-09T20:57:08Z")

</div>

I want to find a point (as a vector) between two vectors based on a float value between 0 and 1? How do I find that point?

The value between 0 and 1 will be derived from a timeline.

![ZoneZoomPointExplanation.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/3/63307043b7c38fc3bac30fa1adc92cd820a2b85a.jpeg)

I tried this but it did not work:

 ![121402-findvectorinbetweenattempt1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/4/9b45809a0ef0cde03458ca1488047ceb97100337.jpeg)

---

<div class="post-metadata">

**Author:** ![Dartanlla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dartanlla/32/724052_2.png) [@Dartanlla](https://forums.unrealengine.com/u/Dartanlla)\
**Post date:** [January 9, 2017, 9:12pm UTC](https://forums.unrealengine.com/t/how-do-i-find-a-location-between-two-vectors/381387/2 "2017-01-09T21:12:35Z")

</div>

I think you want to Lerp (linear interpolate) between two vectors:

[https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Vector/Lerp\_vector/index.html](https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Vector/Lerp_vector/index.html)

The Alpha is the value between 0 and 1.

---

<div class="post-metadata">

**Author:** ![learningOver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@learningOver](https://forums.unrealengine.com/u/learningOver)\
**Post date:** [January 10, 2017, 12:03am UTC](https://forums.unrealengine.com/t/how-do-i-find-a-location-between-two-vectors/381387/3 "2017-01-10T00:03:14Z")

</div>

I would opt to create a direction vector from the two vectors.  
Then using the distance between the two vectors you can simply take a percentage of to move the start point in the direction of your target vector by the amount you desire.

 ![121431-direction.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/1/e71ab89af73756316734b4b1509adb74da800726.png)

---

<div class="post-metadata">

**Author:** ![Mewbits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mewbits/32/1194714_2.png) [@Mewbits](https://forums.unrealengine.com/u/Mewbits)\
**Post date:** [January 11, 2017, 6:49pm UTC](https://forums.unrealengine.com/t/how-do-i-find-a-location-between-two-vectors/381387/4 "2017-01-11T18:49:21Z")

</div>

Lerping worked perfectly after some trial and error. 🙂

---

<div class="post-metadata">

**Author:** ![poet](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@poet](https://forums.unrealengine.com/u/poet)\
**Post date:** [December 11, 2023, 6:01am UTC](https://forums.unrealengine.com/t/how-do-i-find-a-location-between-two-vectors/381387/5 "2023-12-11T06:01:24Z")

</div>

C++ Version

| | | FVector Direction = (EndPositionActor-\>GetActorLocation() - StartPositionActor-\>GetActorLocation()).GetSafeNormal(); |
| --- | --- | --- |
| | | float DistanceBetweenToFVectors = EndPositionActor-\>GetDistanceTo(StartPositionActor); |
| | | FVector AnswerPosition = StartPositionActor-\>GetActorLocation() + ( Direction \* (DistanceBetweenToFVectors \* 0.5f)); |
