# Is there a way to zero world origin to a new location?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226>\
**Category:** Blueprint\
**Tags:** endless-runner, origin, unreal-engine, level, question, Blueprint, World-Composition\
**Created:** [December 22, 2014, 4:40am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226 "2014-12-22T04:40:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mxnko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mxnko](https://forums.unrealengine.com/u/mxnko)\
**Post date:** [December 22, 2014, 4:40am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/1 "2014-12-22T04:40:36Z")

</div>

I am fairly certain its impossible, but just in case it is - is it possible to set world origin to a new location and have it reset the whole coordinate system to that new location as 0,0,0?

I am making an endless runner, and it would help with precision loss at great distances.

If I am thinking about it wrong, please let me know. Currently I just spawn actor tiles in front of the player based on a trigger volume, and destroy them in the same way.

---

<div class="post-metadata">

**Author:** ![PeterLNewton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PeterLNewton](https://forums.unrealengine.com/u/PeterLNewton)\
**Post date:** [December 22, 2014, 4:45am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/2 "2014-12-22T04:45:47Z")

</div>

You sir are in luck.

> **[Set World Origin Location](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Game/SetWorldOriginLocation/)**
>
> Set World Origin Location

![24689-setworldorigin.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/a/77a6ac571d7fc723aea829b72262f6aafb7ec0a1.png)

---

<div class="post-metadata">

**Author:** ![mxnko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mxnko](https://forums.unrealengine.com/u/mxnko)\
**Post date:** [December 22, 2014, 4:48am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/3 "2014-12-22T04:48:04Z")

</div>

SilentX, I’ve tried it, but it does not shift the coordinate system. It simply anchors world origin to new location at x,y,z.

---

<div class="post-metadata">

**Author:** ![PeterLNewton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PeterLNewton](https://forums.unrealengine.com/u/PeterLNewton)\
**Post date:** [December 23, 2014, 6:52am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/4 "2014-12-23T06:52:21Z")

</div>

I assumed it did that. I know this can be a problem for infinite runners or games that are large in general. KSP had a talk on it, so I’m familiar with the problem.

Unfortunately I don’t have an immediate answer, sorry about that.

---

<div class="post-metadata">

**Author:** ![mxnko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mxnko](https://forums.unrealengine.com/u/mxnko)\
**Post date:** [May 24, 2016, 8:10pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/5 "2016-05-24T20:10:26Z")

</div>

@PeterLNewton it appears you’re right. But its not as straight forward as just calling that function. I’m posting answer with BP solution.

---

<div class="post-metadata">

**Author:** ![mxnko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mxnko](https://forums.unrealengine.com/u/mxnko)\
**Post date:** [May 24, 2016, 8:12pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/6 "2016-05-24T20:12:10Z")

</div>

You have to add existing world origin to new location to zero it to a given coordinate. This effectively resets the world to new location - which is very useful for anyone writing large single player games or endless runners.

 ![91874-zero-world-origin.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/c/adcb4b0be8c7547238522fa5fc447d518d1d6c1f.jpeg)

or C++

```
World->SetNewWorldOrigin(FIntVector(newO.X, newO.Y, newO.Z) + World->OriginLocation);
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [April 30, 2017, 12:19am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/7 "2017-04-30T00:19:30Z")

</div>

Truncate was what I was looking for. Upvoted.

---

<div class="post-metadata">

**Author:** ![MikeRPG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MikeRPG](https://forums.unrealengine.com/u/MikeRPG)\
**Post date:** [February 2, 2018, 7:31am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/8 "2018-02-02T07:31:00Z")

</div>

mxnko thank you so much for your solution. I never ever would have thought of adding it. It makes no sense why just setting the origin to the actors location doesn’t actually set it there.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3c13e79c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3c13e79c](https://forums.unrealengine.com/u/anonymous_user_3c13e79c)\
**Post date:** [January 10, 2020, 1:54pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-zero-world-origin-to-a-new-location/302226/9 "2020-01-10T13:54:18Z")

</div>

it does make sense. getting the actor location while the origin is shifted to it will return something near 0, because it’s almost exactly at the shifted origin.
