Camera follow player on X only?

I’m been trying to do this countless different ways, all have failed.

What I’ve tried and the results:

A) Calling a level blueprint function from the player blueprint.
– Failed: couldn’t figure out how to reference level blueprint.

B) Moving the camera within the level directly from player blueprint.
– Failed: tried to find camera using a tag but was unable to do so.

C) Update the camera within the level blueprint by getting the character’s location and moving camera only along X value.
– Failed: Getting character controller only seems to return spawn location and not current location.

D) Referencing player function/blueprint variable and then calling it from level blueprint.
– Failed: Even though I made a static reference the node wants to refer to ‘self’, the level blueprint.

E) Set camera component within player blueprint to absolute.
– Failed: Had no noticeable affect.

I’ve been at this longer than I’d like to admit.

One time bump :slight_smile:

08235285d5926359d351ae1495059026a8b95d03.jpeg

not tested, but thats how i would approach it

you only add the new rotation to the yaw axes

edit: hmm i think i misread the question :smiley:

use a camera attached to your player bp (if you use springArm change the camera variable to it)

I will give that a shot and if it works you’re pretty much my hero.

I’ll buy you a beer as well!

didn’t work for me :frowning:

Hy Lucassou. the Z vector has to be the player Z or the camera goes to the 0.

Just connect z with break vector of Get Actor Location and it works perfectly