# From point A, Get the location X units behind B

**URL:** <https://forums.unrealengine.com/t/from-point-a-get-the-location-x-units-behind-b/495931>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [February 9, 2022, 12:31am UTC](https://forums.unrealengine.com/t/from-point-a-get-the-location-x-units-behind-b/495931 "2022-02-09T00:31:42Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [February 9, 2022, 1:53am UTC](https://forums.unrealengine.com/t/from-point-a-get-the-location-x-units-behind-b/495931/3 "2022-02-09T01:53:54Z")

</div>

> [@WhiteTeapot](#):
>
> The only problem remaining is that I cannot properly explain why this works.

Get Unit Direction Vector gets the direction vector of length 1 that aims from A to B.

The scalar XUnits is offseting that vector by multiplying its value.

You then add the offsetted vector with the B wolrd location to place C.

Basical its: get direction from A to B and move X Units in that direction starting from B location.

---

_[View the full topic](https://forums.unrealengine.com/t/from-point-a-get-the-location-x-units-behind-b/495931)._
