Switching between cameras on a pawn

I struggled quite a bit with the idea of switching between cameras on a pawn - using the set active node does not work. However, I’ve found that using the deactivate node on all cameras, and then using the activate node on the camera you want to switch to, works. I just wanted to share this as I haven’t found many clear answers on how to do this.

The first screenshot is just the different cameras I want to switch between - one first person camera and three third person cameras.

The second screenshot is simply a map of an enum to each camera - The enum value ‘First Person Camera’ is mapped to the first person camera component object. The enum value ‘Third Person Close’ is mapped to the first third person camera component etc.

The input parameter is one of the enum values - if I want to switch to the first person camera, I input the enum value ‘First Person Camera’, and then all of the cameras are deactivated. After the loop is complete, the blueprint will get the camera mapped to that enum value (the first person camera component in this case) and activate this camera component, making the pawn switch to this camera component as its view.

There is a little more to it but whenever I press the V key, the blueprint will get the next enum value (first person camera -> third person camera one -> third person camera two etc) and then activate the camera mapped to that enum value.

I hope this helps someone :stuck_out_tongue: