# Teleport with relative location set

**URL:** <https://forums.unrealengine.com/t/teleport-with-relative-location-set/443626>\
**Category:** Community & Industry Discussion\
**Tags:** relative-location, teleport, unreal-engine, question\
**Created:** [February 18, 2019, 3:35pm UTC](https://forums.unrealengine.com/t/teleport-with-relative-location-set/443626 "2019-02-18T15:35:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CGough](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CGough](https://forums.unrealengine.com/u/CGough)\
**Post date:** [February 18, 2019, 3:35pm UTC](https://forums.unrealengine.com/t/teleport-with-relative-location-set/443626/1 "2019-02-18T15:35:48Z")

</div>

Hi All,

I’m trying to teleport from one location to another but saving the relative distance from the teleport node, so if I’m relatively X:200 Y:230 Z:0 from Teleporter one and go to Teleporter 2 I’ll be the same relative locations from it.

I’ve not had much time to properly look at this but curently I can get my relative locations from an actor by getting the player pawn, get world transform and inverse transform location that from the world location of an actors root. So I can set that relevant location as a variable but how would I then go about using that to offset the pawn by the same values of another teleporter location?

Many thanks and please ask for more clarification if need be, any help is appreciated.

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [February 18, 2019, 4:18pm UTC](https://forums.unrealengine.com/t/teleport-with-relative-location-set/443626/2 "2019-02-18T16:18:28Z")

</div>

math. you basically need to get the location of the player and the teleporter, then subtract one from the other. this will give you the distance that they are apart from eachother, basically the offset. then you just need to apply that offset to the next telporter and set the players location.

 ![268922-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/4/e746c5c741c8e04ad6ee94eb95fb8f25b238747a.png)

---

<div class="post-metadata">

**Author:** ![CGough](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CGough](https://forums.unrealengine.com/u/CGough)\
**Post date:** [February 18, 2019, 4:53pm UTC](https://forums.unrealengine.com/t/teleport-with-relative-location-set/443626/3 "2019-02-18T16:53:00Z")

</div>

Well I do feel stupid. I actually thought that way at first but found an answer on here for something else that sent me down the wrong hole.

This works for sure and saved me from some very long winded method.

Thank you very much ThompsonN13
