diff --git a/Source/RWTHVRToolkit/Private/Core/RWTHVRGameModeBase.cpp b/Source/RWTHVRToolkit/Private/Core/RWTHVRGameModeBase.cpp index c9efeaf30d93cb815d2cd7691d1ba037b3c9f672..e2a1511392d96f9890bb52d309346d2465413593 100644 --- a/Source/RWTHVRToolkit/Private/Core/RWTHVRGameModeBase.cpp +++ b/Source/RWTHVRToolkit/Private/Core/RWTHVRGameModeBase.cpp @@ -53,6 +53,9 @@ FString ARWTHVRGameModeBase::InitNewPlayer(APlayerController* NewPlayerControlle else if (GetNetMode() == NM_Standalone && URWTHVRUtilities::IsRoomMountedMode()) { ClusterId = 0; + const EPlayerType Type = + URWTHVRUtilities::IsPrimaryNode() ? EPlayerType::nDisplayPrimary : EPlayerType::nDisplaySecondary; + State->RequestSetPlayerType(Type); } State->SetCorrespondingClusterId(ClusterId); } @@ -112,10 +115,11 @@ void ARWTHVRGameModeBase::PostLogin(APlayerController* NewPlayer) return; } + // When we're not in standalone: // If the new player is a secondary nDisplay node, spawn it only as a Spectator // Potentially we can use MustSpectate instead. UClass* PawnClass; - if (State->GetPlayerType() == EPlayerType::nDisplaySecondary) + if (GetNetMode() != NM_Standalone && State->GetPlayerType() == EPlayerType::nDisplaySecondary) { // For now, simply use the BP approach of spawning the pawn here. Can do this in a better way potentially. PawnClass = SpectatorClass; diff --git a/Source/RWTHVRToolkit/Private/Pawn/ClusterRepresentationActor.cpp b/Source/RWTHVRToolkit/Private/Pawn/ClusterRepresentationActor.cpp index 2631be95428acef9db48cee55a873bbc9cb93a79..a280d911113902d4918555b0a6b425d31e97ff8e 100644 --- a/Source/RWTHVRToolkit/Private/Pawn/ClusterRepresentationActor.cpp +++ b/Source/RWTHVRToolkit/Private/Pawn/ClusterRepresentationActor.cpp @@ -128,7 +128,7 @@ bool AClusterRepresentationActor::AttachDCRA() } bool bAttached = DCRA->AttachToActor(this, FAttachmentTransformRules::SnapToTargetNotIncludingScale); - UE_LOGFMT(Toolkit, Display, "Attaching DCRA {DCRA} to {this} returned {Res}", GetName(), DCRA->GetName(), + UE_LOGFMT(Toolkit, Display, "Attaching DCRA {DCRA} to {this} returned {Res}", DCRA->GetName(), GetName(), bAttached); DCRA->SetActorEnableCollision(false);