Hi,
I’m struggling to toggle from one camera to another.
I have my main camera on my character and I have 2 on a BP that I want to swap between depending on what widget button I click. I can successfully change from my players camera to the CameraUpgrade but never to CameraSkills. What am I doing wrong below?
I’m not seeing any issues here. Both of these seem identical with a different variable of the same object type and they’re both on your Blueprint. Everything here is fine, the problem would have to be somewhere not shown! Maybe in the button for switching to the CameraSkills camera?
I have however just noticed that changing the camera hierarchy on the BP makes a difference. The problem is it doesn’t matter what button I click on in the widget, it will always change to the camera that is at the top of the hierarchy as in I moved CameraSkills to the top but now CameraUpgrades no longer works at all.
The set view target node will switch to the firstactive camera it can find. To switch between 2 camera components in the same BP, all that is needed is:
Not with the blend node. Use a Timeline instead and Lerp between transforms. Rather than having 2 camera components, you move 1 between 2 coordinates.
It will give a lot of control, too. To the point where you’re likely to ditch Set View Target Blend altogether. That node is a bit fire & forget, mostly the latter.
Alternatively, if you don’t need control and prefer a simple solution instead, turn the camera into an actor and wrap it with a Child Actor Component.
This way you could target a very specific camera with the Set View Target node.