# How do I get the location between 2 points that is at a distance away from one point?

**URL:** <https://forums.unrealengine.com/t/how-do-i-get-the-location-between-2-points-that-is-at-a-distance-away-from-one-point/348376>\
**Category:** World Creation\
**Tags:** fvector, distance, unreal-engine, question\
**Created:** [February 23, 2016, 9:53am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-location-between-2-points-that-is-at-a-distance-away-from-one-point/348376 "2016-02-23T09:53:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_7a8fa987](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7a8fa987](https://forums.unrealengine.com/u/anonymous_user_7a8fa987)\
**Post date:** [February 23, 2016, 9:53am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-location-between-2-points-that-is-at-a-distance-away-from-one-point/348376/1 "2016-02-23T09:53:52Z")

</div>

Hi, given two FVector locations, A and B, and a distance of D cm, I would like to get a location X that is between A and B and also D cm away from B. How do I get this location?

---

<div class="post-metadata">

**Author:** ![lion032](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lion032](https://forums.unrealengine.com/u/lion032)\
**Post date:** [February 23, 2016, 10:42am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-location-between-2-points-that-is-at-a-distance-away-from-one-point/348376/2 "2016-02-23T10:42:50Z")

</div>

Just posed an answer to a similar question:

> **[Vector math](https://forums.unrealengine.com/questions/379874/vector-math-1.html)**
>
> I’m not the greatest with vector math so I’m hoping someone smarter than I can help me find the right formula for this. What I need to do is get my AI to move towards a target (which is not at a set angle from the AI) but I don’t want it to go...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7a8fa987](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7a8fa987](https://forums.unrealengine.com/u/anonymous_user_7a8fa987)\
**Post date:** [February 24, 2016, 6:12am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-location-between-2-points-that-is-at-a-distance-away-from-one-point/348376/3 "2016-02-24T06:12:39Z")

</div>

Wow, what a coincidence! Pretty much the same question at about the same time. Anyway, it worked! Thanks for the help.
