//I have tried that…
void AWeapon::IsAiming()
{
AProjectNameCharacter* Player = Cast<AProjectNameCharacter>(UGameplayStatics::GetPlayerCharacter(this, 0));
bisAiming = true;
FViewTargetTransitionParams Params;
APlayerController* Controller = Cast<APlayerController>(Player->GetController());
//FViewTargetTransitionParams Params;
bool IsNewActive = true;
if (bisAiming)
{
Player->FollowCamera->Deactivate();
ADSCamera->Activate();
Player->FollowCamera = ADSCamera;
//Error here on ADSCamera. Says the target has to be AActor.
Controller->SetViewTargetWithBlend(ADSCamera, Params);
}
}