Where is WORLD_SIZE?

Hi.

As I understand, default world limit is 10km to any direction. How to increase it? Internet says to change “WORLD_SIZE” variable, but it don’t say where is it. I tried to search in engine sources but unsuccessfully.

1 Like

If you are creating very large worlds you may want to look into the World Composition features. Expanding world size can have unintended consequences such as floating point errors at extreme distances.

I make a multiplayer game. Yeah, I met a ‘float problem’ already and solve (I guess) it with ‘rebase origin’ feature. But not-local characters disappear after 10km.

Unfortunately, world composition does not support multiplayer (not yet anyways if I remember correctly).

as I understand, there can be implemented the next scheme: server - all levels are loaded, client - only local tile is loaded. But I don’t need the World Composition, I make a space game without any terrain. :slight_smile:

What about level streaming? search for “ue4 space level streaming”…I remember watching a vid from a space game in development where they were using level streaming. wish i still had link for ya.

Thanks, I’ll try to find it. But there is maybe a singleplayer solution :slight_smile:

I got wrong name: WORLD_SIZE. Correct name is WORLD_MAX.

I got answer: runtime/engine/public/enginedefines.h (or %engine%/source/runtime/engine/public/enginedefines.h)

1 Like

You’ll also want to change WORLD_MAX in the lighting.h file. Got this from a youtube that showed a sample project with increased max in multiplayer.

UnrealEngine\Engine\Source\Runtime\Engine\Public\EngineDefines.h
UnrealEngine\Engine\Source\Programs\UnrealLightmass\Private\Lighting\Lighting.h
#define WORLD_MAX 2097152 change to 2097152000