World composition. Spawning character problem.

**I have a problem with using World composition. I have created Persistent Level and have added several sublevels to it. For loading my world I am using


GetEngine()->Browse(...) 

When I load my persistent level, the sub-level is still not loaded yet and my character is spawning at an empty place and it is falling down. After a moment my sub-level loading is done but my character is still falling down. Sub-level turns out from above in relation to the character (because the character is still falling down). If I move my Player Start slightly higher (1000 by Z-Axis), sub-level has some time to load and my character appears on the surface of the sub level.
How can I handle the time, when sub-level has completely loaded, And how can I manually spawn my character.**

Giving this a bump, having the same issue and I’m curious about people’s solutions! Thanks.

Quick solution : create a plane just beneath actual landing areac (2cm below) in the persistant level.
This platform will be spawned with persistant level creation, your character will be dropped on it. There it can wait for sub-level loading without falling down.

Sorry for necro but this seems to be an under-talked about issue.
I hope this can help anybody else who came across this post from google…

My solution was relatively simple:
1 - Remove the default pawn from your GameMode class
2 - In the persistent level’s “level blueprint” add Event BeginPlay, Delay 0.2, Flush Level Streaming (waits for full load), Delay 0.2 (for good measure), Print String “Loading complete”
3 - If you want to fade the screen or show a loading widget do it immediately after the BeginPlay in the previous step, but I would wait until after you have everything working so you can see what is going on (add a “get player camera manager” node and attach a “start camera fade” node to it set from and to alpha’s to 1 and duration 0.0001)
4 - You should now be able to load into the game and see that no pawn is assigned, and your print string fires when loading is finished
5 - After that print string, call a custom function from your GameMode to spawn an actor of the same class as your old default pawn, and with “Get Player Controller” hook up a “Possess” node (uncheck context sensitive)
6 - At this point you want to run some logic in your pawn that has been newly spawned, immediately disable gravity and input on its BeginPlay
7 - Find a location to move to, either via empty “spawn point” actors in the level or from save data. Move to location, wait a parameterized X number of seconds (I call this load buffer time mine is 3 seconds, allows for new view to be calculated/loaded and stabilized but it isn’t required “flush level streaming” wont return until finished loading)
8 - Additionally after moving to the final spawn location you could and probably should do a second “flush level streaming” or perhaps this is where were should do it in the first place
9 - Remove screen tinting/loading widget, enable gravity and input

Attached some of my blueprint examples
Here is the final result: ShareX GIF | Gfycat
And without the loading screen (second flash is where loading screen would end): ShareX GIF | Gfycat

1 Like