# Pull Request - World Origin Shifting in MP

**URL:** <https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [May 1, 2016, 3:29pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649 "2016-05-01T15:29:56Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Mr\_SquarePeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr\_SquarePeg](https://forums.unrealengine.com/u/Mr_SquarePeg)\
**Post date:** [November 15, 2016, 8:17pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/45 "2016-11-15T20:17:51Z")

</div>

This is very exciting 😃

Happy that this is finally in engine

---

<div class="post-metadata">

**Author:** ![Rhynedahll](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rhynedahll](https://forums.unrealengine.com/u/Rhynedahll)\
**Post date:** [November 15, 2016, 8:29pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/46 "2016-11-15T20:29:01Z")

</div>

> [@nkey;623740](#):
>
> [Unreal Engine 4.14 Released!](https://www.unrealengine.com/blog/unreal-engine-4-14-released)
> 
> ![unknown.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/3/da31ca665506d7a73fb3e038716ad4522299bfe4.png)

Where would be a proper place to insert/use these two new nodes in a multiplayer blueprint game?

---

<div class="post-metadata">

**Author:** ![jonimake](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jonimake](https://forums.unrealengine.com/u/jonimake)\
**Post date:** [November 15, 2016, 8:32pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/47 "2016-11-15T20:32:38Z")

</div>

> [@Rhynedahll;623754](#):
>
> Where would be a proper place to insert/use these two new nodes in a multiplayer blueprint game?

I’d use them in the player controller. On each tick (or every few seconds) check what the current player camera location is, then measure the distance to the last origin and if the distance is greater than some threshold, rebase local origin onto zero with current position and store that origin location. Rinse and repeat.

---

<div class="post-metadata">

**Author:** ![nkey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nkey](https://forums.unrealengine.com/u/nkey)\
**Post date:** [November 15, 2016, 8:34pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/48 "2016-11-15T20:34:40Z")

</div>

> [@Rhynedahll;623754](#):
>
> Where would be a proper place to insert/use these two new nodes in a multiplayer blueprint game?

Mostly before and after sending coordinate as raw vectors over network.

---

<div class="post-metadata">

**Author:** ![adipFTW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@adipFTW](https://forums.unrealengine.com/u/adipFTW)\
**Post date:** [November 25, 2016, 1:56pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/49 "2016-11-25T13:56:05Z")

</div>

Any chance of getting an updated example project in here? The current one is full of errors ☹

---

<div class="post-metadata">

**Author:** ![Taurian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Taurian](https://forums.unrealengine.com/u/Taurian)\
**Post date:** [December 1, 2016, 8:13am UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/50 "2016-12-01T08:13:32Z")

</div>

+1 on the updated project if possible?

---

<div class="post-metadata">

**Author:** ![nkey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nkey](https://forums.unrealengine.com/u/nkey)\
**Post date:** [December 6, 2016, 3:49pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/51 "2016-12-06T15:49:23Z")

</div>

Will try to do it today later

---

<div class="post-metadata">

**Author:** ![nkey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nkey](https://forums.unrealengine.com/u/nkey)\
**Post date:** [December 6, 2016, 7:04pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/52 "2016-12-06T19:04:29Z")

</div>

Project is updated to 4.14 (only config changes). [MPOriginShift.zip - Google Drive](https://drive.google.com/file/d/0B08jTAtYhBTyVUhUTnlMSnJIelU/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Z-enzyme](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Z-enzyme](https://forums.unrealengine.com/u/Z-enzyme)\
**Post date:** [December 7, 2016, 10:43pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/53 "2016-12-07T22:43:16Z")

</div>

Good Heavens! That is sooooo sweet. Thanks!

---

<div class="post-metadata">

**Author:** ![iniside](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/iniside/32/866315_2.png) [@iniside](https://forums.unrealengine.com/u/iniside)\
**Post date:** [January 17, 2017, 8:23am UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/54 "2017-01-17T08:23:44Z")

</div>

Does it allow to have world bigger than 20km x 20km on server ?  
I ask becuase origin shifting shifts origin to the player view location, and on server there is no real player view location, so in theory server would still be limited to the world max.

---

<div class="post-metadata">

**Author:** ![nkey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nkey](https://forums.unrealengine.com/u/nkey)\
**Post date:** [January 17, 2017, 4:58pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/55 "2017-01-17T16:58:37Z")

</div>

> [@iniside;652346](#):
>
> Does it allow to have world bigger than 20km x 20km on server ?  
> I ask becuase origin shifting shifts origin to the player view location, and on server there is no real player view location, so in theory server would still be limited to the world max.

Yes, WORLD\_MAX is still the limit.

---

<div class="post-metadata">

**Author:** ![Alberto\_Inselvini](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alberto\_Inselvini](https://forums.unrealengine.com/u/Alberto_Inselvini)\
**Post date:** [February 4, 2017, 1:17pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/56 "2017-02-04T13:17:34Z")

</div>

> [@nkey;652556](#):
>
> Yes, WORLD\_MAX is still the limit.

Why is that though? What if I disable boundary checking and make say a 200x200km world?  
What kind of issues would I be facing?

---

<div class="post-metadata">

**Author:** ![Taurian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Taurian](https://forums.unrealengine.com/u/Taurian)\
**Post date:** [March 9, 2017, 1:46am UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/57 "2017-03-09T01:46:28Z")

</div>

I’ve noticed that this affects the camera if camera lag is set to on. Is there a better solution to turning it off, setting the new origin location, then turning it back on?

---

<div class="post-metadata">

**Author:** ![iniside](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/iniside/32/866315_2.png) [@iniside](https://forums.unrealengine.com/u/iniside)\
**Post date:** [March 9, 2017, 8:07am UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/63 "2017-03-09T08:07:06Z")

</div>

> [@franktech;678222](#):
>
> The usual example shown on the forums is jitter, particularly weapon attachments beyond a certain point.  
> But for large-worlds / space levels, apocalyptic cases of physics totally breaking down isn’t the full picture.
> 
> So being interested to know too, I’ve been trying out some tests around 200-500 Km / up to 2000 Km etc.  
> In short, while there are theoretical limits, the real practical limits or where the true problems start varies.  
> The first is rendering / break down in depth. Meshes do not render in the right order beyond 100-200 km.  
> One solution is blending multiple cameras of varying depths, but unlike Unity UE4 doesn’t support this atm.

> **[Logarithmic Depth Buffer](https://outerra.blogspot.com/2009/08/logarithmic-z-buffer.html)**
>
> Outerra tech blog.

Doesn’t unreal have it ? That probabaly would best solution (along with rendering within camera local space).

---

<div class="post-metadata">

**Author:** ![ioFlow\_Studios](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ioflow_studios/32/1194555_2.png) [@ioFlow\_Studios](https://forums.unrealengine.com/u/ioFlow_Studios)\
**Post date:** [March 9, 2017, 11:35pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/64 "2017-03-09T23:35:20Z")

</div>

I know I did some moons (ok sphere’s) a million units out in the sky in Eden and they rendered just fine.

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [March 10, 2017, 12:55am UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/65 "2017-03-10T00:55:31Z")

</div>

> [@ioFlow Studios;678673](#):
>
> I know I did some moons (ok sphere’s) a million units out in the sky in Eden and they rendered just fine.

Almost certainly uses logarithmic then, since hyperbolic wouldn’t work at that range. Best way to know for sure would be to check it in the .usf file tho. Anyone know where the z-depth is set up?

---

<div class="post-metadata">

**Author:** ![ioFlow\_Studios](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ioflow_studios/32/1194555_2.png) [@ioFlow\_Studios](https://forums.unrealengine.com/u/ioFlow_Studios)\
**Post date:** [March 12, 2017, 10:57am UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/67 "2017-03-12T10:57:28Z")

</div>

Yep, one was partly behind the other and they were both half behind the horizon of my planet mesh.

---

<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 16, 2017, 10:29pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/68 "2017-04-16T22:29:38Z")

</div>

Hi Nkey!

I was wondering: why not give us the option to choose larger worlds and sacrifice some extra bandwidth? It sounds like that was your original plan but from what I can tell you’re only sending that one extra bit at most.

Thanks,

PS: Is Nkey a play on Enki, the Sumerian god?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d7de5a04](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d7de5a04](https://forums.unrealengine.com/u/anonymous_user_d7de5a04)\
**Post date:** [January 12, 2018, 11:48am UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/69 "2018-01-12T11:48:59Z")

</div>

Thanks A lot

---

<div class="post-metadata">

**Author:** ![MaximeDupart](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maximedupart/32/1194606_2.png) [@MaximeDupart](https://forums.unrealengine.com/u/MaximeDupart)\
**Post date:** [July 28, 2018, 8:18pm UTC](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649/70 "2018-07-28T20:18:28Z")

</div>

Demo project from OP for UE4.20: [MPOriginShift.zip - Google Drive](https://drive.google.com/open?id=1RM9s8ZePlsHjQ6t_BGhfqoNh1KzafOGe)

[Previous page](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649.md?page=2)

[Next page](https://forums.unrealengine.com/t/pull-request-world-origin-shifting-in-mp/62649.md?page=4)
