// AFixedCameraActor : public ACameraActor
void AFixedCameraActor::BeginPlay()
{
Super::BeginPlay();
GetWorld()->GetFirstPlayerController()->SetViewTarget(this);
}
ACubeFightPlayerController::ACubeFightPlayerController()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
// 关掉这个
bAutoManageActiveCameraTarget = false;
}
然后把继承了Fixed Camera的蓝图拖入场景