Switch camera with C++

I have some objects following splines in the scene, and one of the objects has a camera on it that is automatically assigned as the main camera, that fine, even though I haven’t quite understand how this happened, and where to modify this behaviour?

But sometimes I want to have a birds eye view of the whole scene, while I’m test running the game in the viewport, just to see the whole scene a lot better. I figured I can just place a second camera object in the scene to give me the view I want. But how do I toggle between the cameras with a key, and where should I place that code, since the two cameras are separate objects, which class should receive the code, the GameMode class?

Duplicate of : Please Help : How do i switch the main/target camera in c++ - Programming & Scripting - Unreal Engine Forums

Please google before you ask!

P.S. If you want to get a bird’s view for development reasons, try pausing the game and ejecting from the possessed pawn. Then you can move freely.

I did google, but that results never gave be enough help.

However your tip for ejecting the pawn was much more useful, that saves me some work. Thanks!

That duplicate is not properly answered. As the last post question says, I have the same problem. Probably because the game controller tries to use the camera but upon deactivation it tries to manipulate a null pointer.