Hi guys… me again…
So my game is going to have two portions, an offline and an online portion. Each portion will have a different camera setup. Each portion also has it’s own gamemode and controller, but would share the same player pawn.
I was wondering if it’s possible to switch cameras based on which controller is currently being used, code below:
void ASmashyCharacter::PossessedBy(class AController* InController)
{
Super::PossessedBy(InController);
ASmashyPlayerController* OnlineController = Cast<ASmashyPlayerController>(GetController());
ASmashyOfflineController* OfflineController = Cast<ASmashyOfflineController>(GetController());
if (Controller != NULL)
{
FViewTargetTransitionParams params;
if (Controller == OnlineController)
{
OfflineCamera->Activate(false);
FollowCamera->Activate(true);
}
if (Controller == OfflineController)
{
FollowCamera->Activate(false);
OfflineCamera->Activate(true);
}
}
// [server] as soon as PlayerState is assigned, set team colors of this pawn for local player
UpdateTeamColorsAllMIDs();
}
Breakpoints show that the correct controllers are being called, and that it’s comparing the controllers properly, and even shows that it’s reaching the Activate() for each camera depending on which controller is in use. But the camera never switches, i’ve tried this using a button input and the same comparison code and got nothing. Any ideas?