x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: Not Selected
Tags:
more ▼

asked Apr 25 '18 at 10:56 AM in Using UE4

avatar image

kaktusbear
1 1 2 5

avatar image jcstone3 Sep 30 '18 at 01:24 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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 = GetWorld()->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

alt text

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.

more ▼

answered Oct 01 '18 at 12:29 PM

avatar image

Shadowriver
37.8k 937 172 1123

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question