Where is "Default Camera"

1)I Delete All Camera in Level

2)Set Value in AMyPlayerController.cpp 's Contrstrutor (inherits from APlayerController)

PlayerCameraManager = NULL;
PlayerCameraManagerClass = NULL;

3) AND I expect No camera in Level even though some create Error

4) And Click Play in Editor , What?! Camera is Created and View Target

I guess that this Target may DefaultCharater(DefaultPawnClass) or AMyPlayerController

I don’t know what is Target

that doesn’t matter.

the matter is Where Create Camera?
How?

Hello,

What sort of project are you working in? Is it a First Person Project, Third Person, a blank project, etc?

If PlayerCameraManagerClass is null engine spawns the default APlayerCameraManager

https://github.com/EpicGames/UnrealEngine/blob/c314efd9a64885e4b004856e1cf25dd3e6dcde39/Engine/Source/Runtime/Engine/Private/PlayerController.cpp#L2438

if (PlayerCameraManagerClass != NULL)
{
	PlayerCameraManager = ()->SpawnActor<APlayerCameraManager>(PlayerCameraManagerClass, SpawnInfo);
}
else
{
	PlayerCameraManager = ()->SpawnActor<APlayerCameraManager>(SpawnInfo);
}

CameraManager only manages camera for player, the flying camera is a pawn called ADefaultPawn and it a default pawn for AGameMode, if you set DefaultPawnClass in GameMode it to null it should not spawn anything i think

Blank project!~

Thanks a lot

I have to study about cameramgr

I intend

  1. make a mycameramanager

  2. assign this to cameramanagerclass in mycontoller

  3. set off default camera in mycameramanager

Do you know this setup?

Well just make APlayerCameraManager class and override what you want and then set it in cameramanagerclass

But do you really need that? The default view target system is very flexible aspecially in C++, where you can edit camera behavior on view target actor by overriding CalcCamera function in any actor (this includes GameMode and PlayerController)

Ye… i Intend to design lots of camera actos in Amycameramanager.
And one of them is assigned to default camera.
If i select other camera actot which i make, then default camera will be changed.
So i have to set origin default camera to changed one of them

Just switch them voa SetViewTarget in PlayerController or Character

If default camera is flexible, then …Can i change default camera to my custom camera?

By setting view target?

I am having some test “SetViewTarget”
if I do, will add comment here
Thanks a lot!!! :slight_smile: