Streaming Levels On Custom Locations?

Heya,

I’m trying to find a way to create a looping world. When the player goes off the map on the far right he should pop back up on the far left. The conceptual idea is “when approaching right edge load left-most level on the rightmost+1 position, set the world origin to it”, but I can’t seem to figure out how to do this via BP / Code. SetLevelTransform doesn’t work in PIE for some reason apparently, and without that debugging would be a nightmare.

Any alternative way?

No one has any idea regarding this?

I’ve since managed creating a proof of concept via SetLevelTransform, but as said it only works on a desktop release and you can’t use automatic world composition, so overall this wouldn’t be a fun experience long-term.

Isn’t this the same as streaming any other kind of level?
Each Chunk (level) of the total level contains a triggerbox covering it, when entered it makes sure that the chunks on each side is loaded, when you exit, you release the one you didn’t enter.
Level loading is based on names. If you got a fixed number of chunks you should now the chunknames (level) to load.

Because when you normally stream a level it is streamed at a fixed position, this doesn’t help me. I need a map that loops around seamlessly, so if I go off the left edge, the right-most level is streamed in front of me, I don’t get teleported back to the right edge.

There have been a few infinity runners around the forums, but I can’t remember exactly how they do it.

I would say though that the world browser and streaming levels in general need to be fully integrated into blueprint so we can do things like procedurally spawn streamed levels wherever we want them.

Infinity runners usually have world segments as BPs, not Levels. And the only problem really is that SetLevelTransform doesn’t work in the editor.

The way I currently simulate world wrap is to have 3 maps, 1 main and 2 shadows. The player generally stays on the main map, but the other 2 exist to emulate that seamless map transition of a globe. When you reach a certain point in the map you are teleported to the other side so you can continually scroll east or west, and that teleport is almost seamless aside from an almost negligible motion blur which I understand can be removed in post process. When you interact with the shadow maps it changes things on the main map. Without streaming though I am rendering 3 times as many meshes as I need to, which isn’t too bad for my setup but obviously not preferred. Mostly this is just a temporary solution, which like you I would like to upgrade with streaming.

Rama did create a node that lets you spawn actors into streamed sub-levels. Could be useful to you depending on how your level is set up. Spawning tens of thousands of instanced meshes can be a surprisingly fast operation.

Hoping the devs can give us more blueprint control over the whole streaming process in 4.6 though. Would help out quite a bit and should only take a handful of new nodes to accomplish.

In the end what I settled for is a design alteration. I’ll make my transition points controlled locations, tunnels and the likes. With that I’ll be able to teleport the player without them noticing.