The concept behind CameraActor_0

Hi!
There is a mystery about the engine spawning this CameraActor_0.
The _0 is saying “this is the default CameraActor” and it’s very important it seems.
I know it’s a wrapper for a camera component.
It doesnt matter what you add into the scene, more cameras, pawns with cameras…whatever actor
The CameraActor_0 is a temporary actor. It says so in the Level Outliner.
It’s annoying for me to have that actor spawned. It doesnt make sense.
It must be a legacy from the kismet and older version of this engine i guess.
I never get the right answer to why this CameraActor_0 is spawned by the engine.
Iv’e searched the internet and into the c++ code of the class
I know it’s the camera manager that spawns this “temporary actor”
I never get the answer why it needs to do this in the code. No comments for that code for the function that creates it.
“If the engine doesnt find a camera it creates one” is something I’ve came across on the internet.
I create a camera and do the possess and pawn+camera and other stuff… The engine STILL creates one.
“the camera manager use it for camera animation computations” is something I’ve red.
I get that too but why use a camera manager in the level and not private.
Why does the camera manager spawn a CameraActor into the level at all.
It really wants to do that even if i spawn my own 100 Camera Actors.
Can’t this been taken care of inside the camera manager?
The concept behind this CameraActor_0 is really the million-dollar question
Have I missed something.

This is the final post on this. I promise.
The mystery continues…

Cheers all wonderful developers
Björn

I just stated out, and also have been wondering the same thing. Very strange, and can’t really seem to find a good answer.

In such case search the source code to see what is spawning that camera. From my search this is most likely the courprit:

https://github.com/EpicGames/UnrealEngine/blob/f509bb2d6c62806882d9a10476f3654cf1ee0634/Engine/Source/Runtime/Engine/Private/PlayerCameraManager.cpp#L714

// spawn the temp CameraActor used for updating CameraAnims
FActorSpawnParameters SpawnInfo;
SpawnInfo.Owner = this;
SpawnInfo.Instigator = Instigator;
SpawnInfo.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
SpawnInfo.ObjectFlags |= RF_Transient;	// We never want to save these temp actors into a map
AnimCameraActor = ()->SpawnActor<ACameraActor>(SpawnInfo);

Comment explains, it has nothing to do with kismet. It is used for CameraAnims which camera motion effects like shaking.

I notice that owner is set to “this” PlayerCameraManager and i check that property and it confirms indeed CamerActor spawned in those lines of code

Note that camera actors as well as camera components really are just dummies and parameter holders, camera location is resolved by calling CameraCalc to active view target (which usually possessed pawn), it should not take any performance other then kilobytes of memory.