Can I specify which camera to use when I run a Set View Target with Blend?

My characters have two cameras on them, one is a top-down view and one is a first person view.

When one of my characters dies, I have it run a Set View Target with Blend to spectate another player. However, it always chooses the top down camera instead of the first person camera. Is there any way to specify which camera is used?

1 Like

Not really. On the other hand, considering that one of the cameras is Active and the other one is not Active:

And providing you do not need it animated, you could:

image

And no Set View node is needed here.

Is this is enough or do you need the animation blend between the 2?

Well, that’s what I’m doing. The set view target with blend is using a camera that is not active … at least I believe it is not active. If it is truly not supposed to use a deactivated camera, it’s possible the activate/deactivate isn’t being replicated properly. I don’t care if it’s a smooth transition.

To have more details: Player 1 has 2 cameras, a topdown camera and a first person camera. I deactivate the topdown camera and activate the first person camera.

Player 2 then runs a “Set view target with blend” for player 1 and it’s currently using the topdown (deactivated) camera.

I am not using Set View node at all. I misread your post. Somehow I thought it’s about switching between 2 cams in the same actor. My bad. Apologies.

@Chumble Using Child Actor Component should work well here. Each child actor owned by the component has only one camera. Since it’s an actor, the Set View node can target it directly, without the need to flip cameras.

As a bonus, each camera can now sport additional functionality, potentially decluttering the Player Blueprints. And these may come in handy:

Actually your first post gave me the idea that Set View Target would only use active cameras. I thought I’d been replicating properly but I had accidentally attempted a multicast in the player controller, so all other players still thought the wrong camera was active. I moved the logic to the pawn and now it works.

The problem now is that the spectating player’s camera doesn’t rotate with the … uh … spectacle player. I suspect this is because I am having the spring arm rotate with the controller rotation … and for other players, they do not have access to the spectacle player’s controller. So I’m trying to work out how to deal with that part. I could update the rotation on tick or with a timer, using a rinterp to node but it feels clunky. Gonna do some googling to see how others have implemented first person spectating.