RealDocs

APlayerController::ClientTravel

function Engine Since 4.0
#include "GameFramework/PlayerController.h"
Access: public

Description

Travels the client to a different level or server address. For host-driven level transitions, prefer `UGameplayStatics::OpenLevel`. `ClientTravel` is typically called server-side on a specific player controller to redirect only that one client.

Caveats & Gotchas

  • For seamless travel (`bSeamless = true`), the GameMode must have `bUseSeamlessTravel = true` and a valid transition level.
  • Calling this directly on a client (not via server RPC) is undefined behavior in multiplayer.

Signature

void ClientTravel(const FString& URL, ETravelType TravelType, bool bSeamless = false, FGuid MapPackageGuid = FGuid())

Parameters

Name Type Description Default
URL const FString& Map name or IP address to travel to.
TravelType ETravelType TRAVEL_Absolute, TRAVEL_Relative, or TRAVEL_Partial.
bSeamless bool Use seamless travel (no loading screen pause). false
MapPackageGuid FGuid Optional package GUID for the target map. FGuid()

Return Type

void

Example

Server redirects one player to the lobby C++
void AMyGameMode::RedirectPlayerToLobby(APlayerController* PC)
{
    PC->ClientTravel(TEXT("/Game/Maps/Lobby"), TRAVEL_Absolute);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable
5.0 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.