Reloading level causes player character to fall through static platform

I’ve Googled this issue without much luck…

My level starts just fine, but if I call


UGameplayStatics::OpenLevel(this, FName(*LevelPath), true);

to reload the SAME level, my character immediately falls through the default SM_Template_Map_Floor.

Adjusting the player start position to an insane Z pos (like 5000) doesn’t seem to help either… he falls right through it.

Its happening about 90% of the time, and I’m not really sure why.

I’ve read suggestions that I should disable gravity, disable player input, enable flying, wait for some level loading to complete, or even ray trace directly downward to establish collision before re-enabling everything.

Is this pretty standard? Is anyone else having this experience?

Unfortunately this is a common issue, especially when you have level streaming. I recommend that you start the player as spectator (you can set this in game mode), and then restart the player a bit later. You can try using BeginPlay() for that, but unfortunately I’ve had the player fell through the map sometimes when I did that.

OK I’ve solved the problem (albeit in a hackish way)

Opening a level *this *way doesn’t have working collision…


FString LevelPath = FString("/Game/Levels/Castle.Castle");

UGameplayStatics::OpenLevel(this, FName(*LevelPath), true);

But opening a level via command prompt works


GetWorld()->GetFirstPlayerController()->ConsoleCommand("open castle");

I have no idea what this difference is but it seems to correctly initialize physics.