diff --git a/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp b/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp index f6f9f1c01e9cb475c0ae7975b2a412bf0302ee2a..ba4519c6a5efe44023f40cdba4f32cf6b3871398 100644 --- a/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp +++ b/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp @@ -122,14 +122,18 @@ void ARWTHVRPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponen if (ARWTHVRPlayerState* State = GetPlayerState<ARWTHVRPlayerState>()) { // Might not be properly synced yet? - const EPlayerType Type = State->GetPlayerType(); + EPlayerType Type = State->GetPlayerType(); // Don't do anything with the type if it's been set to clustertype or anything. // This is already being done when connecting to the server. const bool bClusterType = Type == EPlayerType::nDisplayPrimary || Type == EPlayerType::nDisplaySecondary; - - if (!bClusterType && URWTHVRUtilities::IsHeadMountedMode()) + + if (!bClusterType) { + if (URWTHVRUtilities::IsHeadMountedMode()) + Type = EPlayerType::HMD; + + UE_LOGFMT(Toolkit, Display, "Pawn: Requesting Player Type {T}...", StaticCast<int8>(Type)); // Could be too early to call this RPC... State->RequestSetPlayerType(Type); }