Locking Camera movement to only the X axis

I am creating a 2D platformer-esk game; However, the character can jump , which moves the Camera on the Y axis which I do not want, How would I go about moving the Camera on the X Axis regardless of player’s Y and Z position?

You might want to attach the camera directly to the character mesh without a spring arm in between. Setup the proper Z and Y values in the camera properties. Update the X axis of camera on the Tick function of the character.

But keep in mind that this sometimes result in camera getting blocked by other objects. To avoid this, you might want do do a trace from mesh to camera and using the hit-info, relocate the camera. But if your level design allows you to make sure that the camera is never blocked (like in Mario games), you dont need to do this.

Great Idea!

Thank You!

Make sure that the Camera’s position is given in Absolute values (not relative). You can switch by clicking on the label (ie click on "position’ label in properties panel)

It did not, but it was a good learning project

Have you made any progress, is the issue solved?

Why did it not work? I you need any further help, let me know

nah, I’m good, thank you though

Well if you managed to figure it out could you please share how you did it, I am having the same issue