Create vs Join server

I am unsure why two different methods are used to load the level when creating vs joining a server.

When creating a server you change the scene like this:

GetWorld()->ServerTravel("/Game/ThirdPerson/Maps/ThirdPersonMap?listen");

But when joining a server you do it differently :

APlayerController* PlayerController = GetGameInstance()->GetFirstLocalPlayerController();
if (PlayerController)
{
    PlayerController->ClientTravel(Address, ETravelType::TRAVEL_Absolute);
}

Can you please explain why this method is needed to load the game world for the clients joining the server, but not for the first client that created the server?

Hi and welcome to the community.

When you perform a server travel, the client that is also hosting the server also performs a client travel. For all other clients, client travel is required to join.

Privacy & Terms