Thirdperson camera switched to another tp camera when triggering box

(I have a good knowledge of Unreal engine, only not for the “game making” aspect)

.

So here’s the thing :

I wanted to have 2 camera following my player, one activated by default, and the other only activated when going through a triggerbox, and deactivated when passing through another one.

So I went to the ThirdPersonMap blueprint, and came up with this rather simple setup :

My only issue being that instead of the “cameraTESTT”, I would like to have my “CameraR” activated

Screenshot_2
(CameraLF being the one activated by default)

But I can’t find a way to put call the CameraR to the ThirdPersonMap blueprint.


So I went for another solution :

Get the “CameraTESTT” to be attached to my third person character, just as “CameraR” and “CameraLF” are, but again, I can’t find a way to make it work.


So I went for yet another solution :

Get the “On Actor Being Overlap (TriggerCameraR)” node to be in the ThirdPersonCharacter blueprint (probably dumb I know, but I’m a noob when it comes to this to hey :sweat_smile:) but again, I couldn’t find a way to make it work.


So do you have any solution for these 3 things ? or another solution that could solve my issue, and also, if you see anything dumb or mistakes I made, I’ll be glad to hear it, I have a lot to learn… :thinking:

Thank you for your time

Avoid scripting in the Level Blueprint unless you really have to.


Consider the following:

  • an actor with a couple of collision boxes and a camera:

  • the actor is placed in the level:

And its components can be moved where they are needed.

Would this work for you?


As a bonus, you can now place as many of those actors as you need and no additional script is necessary.

1 Like

I see, thank you for your answer

I still have one issue though, how can I have my exterior camera still parented to my thirdpersoncharacter, with a spring arm ? :thinking:

Just to clarify things so we’re on the same page. Is there a good reason for this behaviour? Why parent this external camera? Because if you want the camera to track the player, that’s not a good enough reason, for example.

Asking so I can provide an answer that makes most sense.

1 Like

Well to put what I want to do simply :

I have my character and a camera following him and it’s fixed with no rotation whatsoever :


The camera looks convenient when going left and forward (I’ll still have to do some touch up), but when going to the right like this :

I 'm losing visibility to where I’m going, so what I wanted to do is :

By default the camera is tilting to the left
When a plateform leads you to the right, I have a trigger that will activate the other camera to see what’s to the right.


Unless there’s a way to have the same camera to truck and pan when the player hits a trigger ?


Or maybe I overcomplicate this thing and there’s an easier solution ?

(btw I also want another camera to go up and tilt a little bit when the player is moving toward the camera, to, again, have a better visibility in front of the player)

1 Like

Good explanation! :1st_place_medal:

I would not make external cameras for this. It could work but that’s going to be a lot of work and tweaking. If you must do it this way, you could try:

This would attach this external camera to the player. Detach it when we leave the box.


Unless there’s a way to have the same camera to truck and pan when the player hits a trigger ?

Sure, this is pretty easy and could work well enough:

You can then choose what rotation is needed when entering / leaving triggers:

Place any number of those trigger points and punch in the desired rotation, as above. To make it easier on yourself use a component arrow to visualise it:

The camera would point where the arrows points and still tracks the player, and it’s easier to rotate an arrow than to figure out rotator values:


But I feel that the best way to handle this would to make a smarter camera that rotates towards the direction of the movement but maintains a specific angle.

For now try it with the triggers, see if it delivers a reasonable result. Making a smart camera could become somewhat involved.

1 Like

I’m sorry for the late answer. I tried doing your solution, it mostly worked out, but I needed some more tweaking for my very specific case.

After reworking on it for a few days, I finally got what I wanted and completly forgot about this thread, but thank you for your awesome help and guidance :sweat_smile: :pray:

1 Like