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.
asked Jul 31 '15 at 10:35 PM in Blueprint Scripting
this is doc page describing 2D content https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Paper2D/index.html , 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 https://www.youtube.com/watch?v=9FKG7fFWKOA&index=2&list=PLc9juHldTxu1Yxnyw7U7SaSUdZfC6shED 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
answered Aug 01 '15 at 02:27 AM
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.
answered Feb 17 '16 at 06:10 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here