Switch Camera Problem

I know about SetViewTarget, and its work perfect but the problem I have is I can’t get the view CameraCpmponent of another Actor or Pawn.

I can get my Actor ( the one have the camera ) then get Camera of it and then Cast the camera to Actor again ( cause SetViewTaget only accept Actor ) but Cast returns Null.

UCameraComponent *GetCameraFromBarrier = GetBarrier->MyCamera;
Actor *CameraActor = Cast<AActor>(GetCameraFromBarrier);
	if (!ensure(CameraActor)) { return; }     // recive Null
GetWorld()->GetFirstPlayerController()->SetViewTarget(Cast<AActor>(CameraActor ));

this code doesn’t make sense even to me( i write it from desperate ), it must be a better and correct way. ( this code failed anyway).

simply my question is if anyone can explain to me how can get the view of CameraComponent of another Pawn or Actor, I will be grateful?

Thanks.