How to switch to another camera component without deactivating others?
I have multiple camera components in an actor. How can I switch to a different camera component within an actor, without deactivating other camera components?
There is an answer that deals with this by deactivating all other camera components within the actor. https://answers.unrealengine.com/questions/45130/switching-between-multiple-characters-within-the-c.html
Unfortunately, this is not the solution I expect, because I need all camera components activated (they are bound to other widgets, like minimaps or car rearviews).
For example, I have two camera components, one for front view (main), and one for rear view. When I start the game, the rear view is displayed on screen, whereas the front view is expected. I have no idea how to switch to the front camera to display on screen. Thank you very much!
You will not be able to achieve what you want because of how actors calculate which camera component is Active. Set View node just queries the actor and gets the first active camera (a bit of a mystery how this is calculated, I need to find it in c++, perhaps it's small fix).
So no, you can't do it, not in pure blueprints. Especially that you need the rear cam active at all times.
If you mean a Child Actor Component, then that'd be the bast way to go about it as they spawn and destroy actors automatically. That would be elegant enough for most cases.
Follow this question
Once you sign in you will be able to subscribe for any updates here