# Is World Origin Rebasing working?

**URL:** <https://forums.unrealengine.com/t/is-world-origin-rebasing-working/103873>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [December 14, 2017, 3:12pm UTC](https://forums.unrealengine.com/t/is-world-origin-rebasing-working/103873 "2017-12-14T15:12:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eyosido](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eyosido](https://forums.unrealengine.com/u/eyosido)\
**Post date:** [December 14, 2017, 3:12pm UTC](https://forums.unrealengine.com/t/is-world-origin-rebasing-working/103873/1 "2017-12-14T15:12:02Z")

</div>

Hi, I am using World Composition and enabled World Origin Rebasing in World Settings. My world is close to 64kmx64km with 16 tiles. Since I enabled origin rebasing, the engine goes with tons of logs like the following:

```auto

LogLevel: WORLD TRANSLATION BEGIN {-397825058, 1352878516, 0} -> {-387412943, 1366202854, 0}
LogLevel: WORLD TRANSLATION END {-387412943, 1366202854, 0} took 0.0589 ms
LogLevel: WORLD TRANSLATION BEGIN {-387412943, 1366202854, 0} -> {-377000828, 1379527192, 0}
LogLevel: WORLD TRANSLATION END {-377000828, 1379527192, 0} took 0.0841 ms
LogLevel: WORLD TRANSLATION BEGIN {-377000828, 1379527192, 0} -> {-366588713, 1392851530, 0}
LogLevel: WORLD TRANSLATION END {-366588713, 1392851530, 0} took 0.0913 ms
LogLevel: WORLD TRANSLATION BEGIN {-366588713, 1392851530, 0} -> {-356176598, 1406175868, 0}
LogLevel: WORLD TRANSLATION END {-356176598, 1406175868, 0} took 0.0721 ms
LogLevel: WORLD TRANSLATION BEGIN {-356176598, 1406175868, 0} -> {-345764483, 1419500206, 0}
LogLevel: WORLD TRANSLATION END {-345764483, 1419500206, 0} took 0.1010 ms
LogLevel: WORLD TRANSLATION BEGIN {-345764483, 1419500206, 0} -> {-335352368, 1432824544, 0}
LogLevel: WORLD TRANSLATION END {-335352368, 1432824544, 0} took 0.0730 ms
LogLevel: WORLD TRANSLATION BEGIN {-335352368, 1432824544, 0} -> {-324940253, 1446148882, 0}
LogLevel: WORLD TRANSLATION END {-324940253, 1446148882, 0} took 0.0631 ms
LogLevel: WORLD TRANSLATION BEGIN {-324940253, 1446148882, 0} -> {-314528138, 1459473220, 0}
LogLevel: WORLD TRANSLATION END {-314528138, 1459473220, 0} took 0.0769 ms

```

And this is taking an enormous amount of time, I didn’t even let it finish, it was still not complete after several minutes. I do not have lots of actors into the world, it is mostly empty. Is this a bug? I am using 4.18.2.

Update: I looked at the code and rebasing is occuring on UWorld::Tick() upon the following condition:

```auto

    if (OriginLocation != RequestedOriginLocation)
    {
        SetNewWorldOrigin(RequestedOriginLocation);
    }

```

Problem is that RequestedOriginLocation is constantly changing, so it never ends…

Looking further into it, here is what is happening:  
UWorld::Tick() is calling UpdateStreamingState() itself calling EvaluateWorldOriginLocation(ViewLocation), this leading to calling RequestNewWorldOrigin() with a new value, hence the constant recalculation of world origin. ViewLocation is not changing value though, so this is the following code into UWorldComposition::EvaluateWorldOriginLocation which is causing the constant rebasing:

```auto

    // Request to shift world in case current view is quite far from current origin
    if (Location.SizeSquared() > FMath::Square(RebaseOriginDistance))
    {
        OwningWorld->RequestNewWorldOrigin(FIntVector(Location.X, Location.Y, Location.Z) + OwningWorld->OriginLocation);
    }

```
