Hi there.
I currently have a problem with the Camera.
When a Player Controller is created, the View is always 0,0,0 for a short period of time.
No matter where I put my Camera Initialization.
I tried [FONT=courier new]APlayerController:SpawnPlayerCameraManager(), [FONT=courier new]APlayerController:PostInitializeComponents(),[FONT=courier new] APlayerCameraManager::InitializeFor(APlayerController* PC) and [FONT=courier new]APlayerController:BeginPlay()
but NONE of them helped (In the PlayerCameraManager case I even set the ViewTarget directly after spawning the Manager!).
I want to have a black screen when my (Multiplayer)Game starts and fade in when the Game starts.
This is how it is now:
https://streamable.com/ms3cs
As you can see, the Clients see the Sky before the Game Starts (0,0,0 because ViewTarget is Player Controller)
This is my current code now:
void AARPG_PlayerControllerBase::PostInitializeComponents(){
Super::PostInitializeComponents();
createCamera();
}
void AARPG_PlayerControllerBase::createCamera(){
this->camera = GetWorld()->SpawnActor<AARPG_Camera>();
this->SetViewTargetWithBlend(camera,0.0f,EViewTargetBlendFunction::VTBlend_Linear,0.0f,true);
camera->SetOwner(this);
}
void AARPG_PlayerControllerBase::BeginPlay(){
Super::BeginPlay();
PlayerCameraManager->StartCameraFade(1, 0, 1, FLinearColor(0, 0, 0), false, true);
}
APlayerController:bAutoManageActiveCameraTarget is set to false in the Constructor!
Does someone have any suggestion regarding that topic?