void AMyProject3Character::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
//UE_LOG(LogTemp, Warning, TEXT("The float value is: %f"), JumpHeightUpper);
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
if (PlayerController)
{
APlayerCameraManager* PlayerCameraManager = PlayerController->PlayerCameraManager;
if (PlayerCameraManager)
{
AMainPlayerCameraManager* GetMainPlayerCamera = Cast<AMainPlayerCameraManager>(PlayerCameraManager);
//AMainPlayerCameraManager* CameraManager = Cast<AMainPlayerCameraManager>(UGameplayStatics::GetPlayerCameraManager(GetWorld(), 0));
if (GetMainPlayerCamera)
{
CameraManager->StartFOVInterpolation(CameraManager->CurrentFOVGetter() + WallRunFOVIncreaser + SpeedFOVIncreaser);
}
else
{
UE_LOG(LogTemplateCharacter, Error, TEXT("No MainPlayerCameraManager found."));
}
}
else
{
UE_LOG(LogTemplateCharacter, Error, TEXT("No PlayerCameraManager found."));
}
}
else
{
UE_LOG(LogTemplateCharacter, Error, TEXT("No PlayerControloler found."));
}
“No MainPlayerCameraManager found.” is being triggered. Why could this not be working? The proper include is there. Let me know if you need any further info!