Offset Entire Loaded Level / All Actors in a Level

We are working on a project that uses live data in a virtual world. However from day to day, the zero point of the data changes. Generally these are defined locations, but they can be changed. For our software this is generally helpful - for the most part we want everything to be relative to where the zero in the data is.

However in order to achieve that we either need to do one of two things - either move the entire virtual level, or offset all the data and anything that is relative to that zero position. We would much prefer to do the first as all of our systems would work better being relative to that zero position.

In our non-Unreal older version of this project we would just offset the world - however its a little more difficult in Unreal.

The question we have is what is the best way to offset the world - and is it even possible.

Can we load the level with an offset - ideally not using sublevels as we have had issues with those but?

Should we parent everything to a single actor - we don’t use static lighting but there still seems to be performance implications for setting everything to Movable.

What do you recommend? Or is it to difficult to do and should start working out how we can offset all our data to match the static level

Hi Matt!

In our experience, what proved to be the easiest solution for these use cases, are Level Instances (UE5+) - you can pack whatever parts of the world to one or multiple and then move where needed, as they have their own transform. You can also load and unload them by data layers, if you need the ability to switch between them in single master level/map.

https://dev.epicgames.com/documentation/en\-us/unreal\-engine/level\-instancing\-in\-unreal\-engine

Hello,

As mentioned (thanks for this!), level instances can be used to spawn arbitrary levels at arbitrary locations.

p.s. Epic employees will be out of the office from June 30th to July 11th in case you respond while we are away.

Thanks,

Ryan

Ok cool - I think we looked at level instances a while back for loading the levels but decided it wasn’t worth the effort before in terms of making sure all the core systems were setup properly. Given this I think it will probably be worth setting up our system to load our levels as instances and refactor any on level load things to work a little differently.

How do WorldSettings work with Instances because that is something we do make good use of?

What issues were you running into?

Every level (including sublevel or level instance) contains its own AWorldSettings, and I think only the world settings of the main world are active and used. However, you should be able to access the world settings of the instanced level (see ULevel::GetWorldSettings).

-Ryan