Switching the Camera from the Player Character to a Camera Component in an Actor Blueprint

Hello,

I’m currently using the standard template for a Third Person Character. I have two camera components on this blueprint which I can switch between at the press of a button and this works fine.

However, I now have an Actor Blueprint in my world which has a camera component inside it. When the player is pressing a button, they interact with this Actor Blueprint. How can I go about switching to the camera in the Actor Blueprint?

I have tried getting a reference from the Get All Actors of Class > For Each Loop, then setting the camera component as the active one (alongside deactivating the current follow camera) but this uses a camera inside the player instead, which I believe is a default fallback.

Any help is much appreciated.

EDIT

It appears to work fine if I set the other camera in the Player Character to active as a debug test (the camera I have it set to change to when pressing a button). So it seems the issue is isolated to picking a camera in a different actor.

It looks like I solved my issue by activating the camera first. I had Auto Activate disabled in the Actor Blueprint for the Camera Component as I was under the impression this would set the view to this camera automatically, but it doesn’t.

I need the camera to not be active for future scripting plans, so I just use the Set Active node from the GetPlayerCharacter reference to activate / deactivate as needed, then continue to use the Set View Target with Blend node to change the camera currently being used.