How to temporarily change player camera to "external BP" camera?

For this particular feature I can’t use matinee and so I would need to temporarily switch player’s camera to “external” camera from custom blueprint. How would I go about that?

Thanks

Hi ,

Sounds like you want to switch cameras temporarily which can be done with a Set View Target with Blend node.

Here’s a quick example:

1 - Enter TriggerBox1, switch to CameraActor1.

2 - Exit TriggerBox1, switch to DefaultCamera.

Ah, so it was Set View Target. Couldn’t find the node that would do the switch. Thanks.

Just a Tip: Sometimes you will find the node you need by dragging the wire from the output of your starting node/variable and release it at empty canvas.This will pop up the nodes window only with nodes that make sense to complete your function( kind of auto complete function).

hope it helps.

The camera I’m switching to is coded in BP to follow the player (let’s say a security camera). But when I switch to the camera via “Set View Target with Blend” I get static camera even though printing debug information about camera’s rotation reveals that it is actually following the player, just the new view ignores that (it looks like it uses the first “pose” camera had when I switched to it).

I tried setting the view every frame, but that doesn’t seem to work either.

Post a screen of your Blueprint and I’ll take a look.

Alternatively, you could try something like the BP below:

This simulates a Security Camera and tracks the player’s movement.

You’ll need something to trigger the camera though, I setup a triggervolume inside the Level Blueprint to switch to this camera. Let me know if this works for you or if you have additional questions.

-W

And if you switch to that camera via “Set View Target with Blend” the camera is still watching you? While player is in the trigger box I need to be looking at him through that security camera which should be rotating to keep the player in the view.
I got the triggers, camera and all that working. It’s just when I switch to the camera via “set view…” the camera stays static.

Yep. Below is my Level BP which triggers the camera.

It stays on this camera always (since I don’t have a EndOverlap command setup, but you could do that to turn it off when leaving the trigger volume if you wanted to).

Doh, what a stupid mistake. I was updating the camera rotation from a flow that was driven by a timeline (which was animating the blend) and so once the blend was done camera rotation wasn’t updated anymore, but the debug values that went into the camera were driven by Tick, so I got confused :).
Anyway, it’s working now. Thanks for your help.

Hi,
it’s all works but how after switch cameras turn it to cinematic mode, something like dis.

Then you need to create a Matinee with your camera ( or a new one).Use your Matinee in the Level Blueprint or a Blueprint just made to this.
Create a trigger, use this trigger in the BP as a OnActorBeginOverlap,same as the exemple above and plug it to a Play node, call your Matinee as reference and plug it on play node as Target.To stop,create a Stop node

i’m using the “3rd person blueprint” asset , after entering the trigger , camera changes to the custom camera , but after exiting the trigger , it becomes a first person camera for some reason . how can i fix this ?

is the above comment also solution to this ? if it is can u please explain more ?i didnt quite understand .

Hi, I was having the same issue as the original post’s writer and solved it using the Accepted Answer, but am having similar issues to the previous post.
My version is coming from FPS to static level camera, and then back to FPS, but upon the reset back to FPS, it put’s my camera on the floor underneath my character instead of at the pawn’s camera location.

Any ideas on whats happening / how to fix this?

Actually i solved my problem with playing around with nodes .

1- hook up the " Get player Controller " node to "Target " input .
2- hook up the " Get Player Character " node to " New View Target " input .

nice one, solved it for me aswell

Hey there :smiley:
i have a small but anoying problem, everytime i enter my triggersphere the viewport changes to the camera i want it to but when i exit the triggersphere its like i shrunk to half the size… i can move completly normal but the player camera is not in the same hight as before :frowning: hopefully someone knows a solution.

Try adding the box marked in yellow to get player character as the target for the end overlap (this has been updated a little to check for a tag so only the player triggers it).

I have the same issue, the camera returns to the root position of the pawn, not the camera component position for the get player controller. My camera ends up looking from inside my player mesh in other words.

I think I solved the issue …

http://www.robertramsay.co.uk/ue4/cameraBackToBallSolve.jpg

You don’t need that extra SET part in red (find camera component on view target) by the way, I added that as a pre-thought and forgot to remove it.

my level blueprint doesn’t have set view target with blend node (my player controller blueprint does, but I can’t drop in my camera reference)… help?