# \[FIXED\] Set World Origin Location only works correctly up to a limited distance. (HELP)

**URL:** <https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [May 10, 2020, 3:47am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214 "2020-05-10T03:47:55Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [May 10, 2020, 3:47am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/1 "2020-05-10T03:47:55Z")

</div>

I’m creating an open space world game so I call the tick function for world origin rebasing but it only works correctly up to a limited distance. (FIXED)

> **[GitHub - moipum16/WorldOrigin:...](https://github.com/moipum16/WorldOrigin)**
>
> https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1758198-set-world-origin-location-only-just-thrice-times-only-help - GitHub - moipum16/WorldOrigin: https://forums.unre...

FIXED THERE: [https://forums.unrealengine.com/comm…in-rebase-tool  
:rolleyes:](https://forums.unrealengine.com/community/released-projects/1767108-released-multiplayer-world-origin-rebase-tool)

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [May 10, 2020, 3:52am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/2 "2020-05-10T03:52:49Z")

</div>

![reabbase.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/7/87ade017e5e2fc1e14e1428aec524893e7250fbc.jpeg)

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [May 10, 2020, 4:19am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/3 "2020-05-10T04:19:55Z")

</div>

Please help, I fear I lost 1 year of work for nothing…

---

<div class="post-metadata">

**Author:** ![UnrealXinda](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnrealXinda](https://forums.unrealengine.com/u/UnrealXinda)\
**Post date:** [May 11, 2020, 3:52am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/4 "2020-05-11T03:52:53Z")

</div>

Could you reformat your posted code with wrapped code tags? It’s really unreadable to tell if anything goes wrong.

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [May 11, 2020, 9:03pm UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/5 "2020-05-11T21:03:43Z")

</div>

I put it on GITHUB: [https://github.com/moipum16/WorldOrigin](https://github.com/moipum16/WorldOrigin)

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [May 11, 2020, 9:05pm UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/6 "2020-05-11T21:05:54Z")

</div>

Sorry I gave Ctrl A in my code had not come out right

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d0719dbe1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d0719dbe1](https://forums.unrealengine.com/u/anonymous_user_d0719dbe1)\
**Post date:** [May 11, 2020, 9:32pm UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/7 "2020-05-11T21:32:40Z")

</div>

He ment use the

```auto

 brackets when you post on the forums. If you notice in the text box theres a bunch of text formating buttons above the forum text box. On the right side is one that is for copying and pasting code and posting it into the forum.

Also is this blueprint code converted to c++ code using the unreal engine built in converter?
```

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [May 11, 2020, 9:56pm UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/8 "2020-05-11T21:56:54Z")

</div>

I have found that in fact the further away from the absolute 0 point in the world, the repositioning of the origin to my location the less it works correctly, the repositioning of the origin of the world is only working up to a certain distance. It only increases the maximum range before starting the bug in the calculations. But this distance is scaled relatively to the size of the player’s pawn, but if I increase the size of the character, smaller objects will be agitated regardless of location.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d0719dbe1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d0719dbe1](https://forums.unrealengine.com/u/anonymous_user_d0719dbe1)\
**Post date:** [May 12, 2020, 1:28am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/9 "2020-05-12T01:28:19Z")

</div>

this is how I do it

```auto

if (GetActorLocation().SizeSquared() > FMath::Square(1000000.f)) {
    GetWorld()->SetNewWorldOrigin((FIntVector)(GetActorLocation()) + GetWorld()->OriginLocation);
}

```

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [May 12, 2020, 2:18am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/10 "2020-05-12T02:18:03Z")

</div>

> [@](#):
>
> this is how I do it
> 
> ```auto
> 
> if (GetActorLocation().SizeSquared() > FMath::Square(1000000.f)) {
> GetWorld()->SetNewWorldOrigin((FIntVector)(GetActorLocation()) + GetWorld()->OriginLocation);
> }
> 
> ```

Could you show me where I could overlay this code for testing?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d0719dbe1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d0719dbe1](https://forums.unrealengine.com/u/anonymous_user_d0719dbe1)\
**Post date:** [May 12, 2020, 3:49am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/11 "2020-05-12T03:49:41Z")

</div>

do you have a c++ class for your character or pawn that the player controls? It would go in there in the tick function.

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [May 26, 2020, 6:24pm UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/12 "2020-05-26T18:24:36Z")

</div>

FIXED THERE: [https://forums.unrealengine.com/comm…in-rebase-tool](https://forums.unrealengine.com/community/released-projects/1767108-released-multiplayer-world-origin-rebase-tool)

---

<div class="post-metadata">

**Author:** ![Axyzz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Axyzz](https://forums.unrealengine.com/u/Axyzz)\
**Post date:** [August 19, 2025, 4:59am UTC](https://forums.unrealengine.com/t/fixed-set-world-origin-location-only-works-correctly-up-to-a-limited-distance-help/143214/13 "2025-08-19T04:59:21Z")

</div>

Please I didn’t find the post with the fix, what did you do to fix it? I’m having exactly the same problem, the set world origin location only accepts a certain number of decimal places
