Multiplayer Player Spawning Issue C++

I am writing a multiplayer game that overrides the ChoosePlayerStart method to choose a player start based off of which team the player belongs to. I have debugged and tested this and it’s working correctly.

On the server, the player spawns immediately at the correct location. On the client, the player spawns in an incorrect position (seems like 0,0,0) for a split second, then moves to the correct spot. I am not sure why this occurs and it looks very unprofessional.

Some additional details: I have tried to create a black screen widget that covers the screen for the first few seconds, which gets created on the level’s BeginPlay, HOWEVER the spawning seems to happen before then since I can still see the client spawn for a split second before the screen goes black.

Anyone have any ideas how to deal with this?

Hi there @S0lly, hope you’re well!

This topic has been moved from International to Programming & Scripting: Multiplayer & Networking.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile:

Are you sure it is actually spawning, or is it just the initial camera location after loading screen, before spawning happens ?

I found a post about the same issue, going to try the solutions mentioned there. OnPostLogin spawn issue - #13 by mgumley

How do you know it’s spawning and not just the initial camera position right after the loading screen, before spawning begins? monkey mart

Have you set a default pawn in the world’s game mode? if so, remove it and try again.

In which GM event do you handle spawning the player pawn? I found out it is safe to do so after the event OnPostLogin is called.