How do I set up a parallax (panning) background in a 2d side-scroller?

I am trying to set up a parallax background image for my 2d side-scrolling game so that as I move horizontally through my level the picture in the background stays in the same position.

I saw some similar postings on this site but nothing I understood. I’m new to creating games so any pictures or step-by-step guides would be greatly appreciated! I’m really lost here!

Thanks a ton.

Hi,

this is doc page describing 2D content Content Examples Sample Project for Unreal Engine | Unreal Engine 5.1 Documentation , you can simply download free example called “content example” from launcher and open level probably called "Paper 2D Content Examples"to see how 2D things work

regarding to one way of implementation:

simply use 2D texture behind your level and move it in opposite direction with small speed, so when character moves, visually it would look like background moving too

if you create new project in editor and select 2d sidescroller, on level you can right click background and select “find in content browser”

also you can try make animated sprite Unreal Engine, 2D Sprite Animations - UE4U.XYZ - YouTube and probably control it’s update to move image in directions

p.s. don’t forget mark question as answered with little gray circle button under any answer (not comment, but whole answer) when problem solved, so anyone else later can have same question and may find solution faster, if you find solution on your own, don’t forget write it too

Hi happyhorror, thanks for the response! However, would you have any idea what the blueprint to do this would look like?

Hi Kirby,

If I’m understanding the question right, all you need to do is change the camera setting from orthographic to perspective.

In C++ it should be as easy to commenting out the orthographic lines, as it’s perspective by default.

In blueprint, just select the camera in the viewport, and look through it’s properties, wherever it’s set to orthographic, set it to perspective.