I’m creating a space game and ran into a problem that I haven’t been able to solve yet.
When working with enormous worlds like space, coordinate precision drops quickly. Unreal Engine now supports 64-bit world coordinates, which already improves precision significantly. Still, I would like to rebase the world to further increase precision and keep everything stable.
The problem is that the native node Set World Origin Location doesn’t fully accept the coordinates I’m passing. I later realized that it only supports 32-bit coordinates.
This is an obstacle because my coordinates are 64-bit, larger than what 32 bits can represent. In my system, I start with large coordinates due to the planet respawn system. As soon as a respawn occurs, I try to set the world origin to the new position, precisely to avoid precision issues.
Does anyone have suggestions on how to work around this? It’s great that Unreal Engine supports 64-bit world coordinates, but limiting Set World Origin Location to 32 bits prevents proper world rebasing with these coordinates.
Yeah, that’s a common headache. Since Set World Origin Location
only takes 32-bit, most devs break down 64-bit coords into offsets and keep things player-centric to avoid precision loss. Kind of like Aftermath Bail Bonds—resetting things so they stay stable when it all gets messy.
1 Like
Sorry, but I didn’t understand. So it really isn’t possible to rebase the world on 64-bit coordinates? Regarding your suggestion, could you give me an idea of how I can start doing that? Will I have to move everything manually?
You can get the world position of an Actor and subtract an offset vector to create a new, relative 32-bit vector.
Get World Location: Use the “Get Actor Location” node to get the 64-bit world position of your target Actor.
Get Camera Location (Offset Vector): Use “Get Player Camera Manager” and “Get Camera Location” to get the world location of the camera. This is a good candidate for your offset.
Subtract Vectors: Use a “Vector - Vector” node to subtract the camera’s location from the Actor’s location.
Cast to Vector3f: Explicitly convert the result to an FVector3f
(single-precision vector).
Ok, so can I use this in the Set World Origin Location node? If that’s the case, unfortunately, I’ve already tried it and it doesn’t work. The Set World Origin Location node expects absolute world coordinates to function properly, not relative world coordinates.