Distant backgrounds that move slower than foreground
Hey, I tried to make a moving background to give the sense of depth, the brown area is the closer part, while the mountains are meant to be distant, and move the least when you travel.

What do you think? The only problems I had initially was that the background would eventually sink away if moving up to much, or move when the character is stuck while moving. Of course, I tried to solve this by constraining the background in some way to the characters x,y position. I calculated movement by making it go the opposite direction of the character at a fraction of the speed. Things I need to test but haven't gotten to are constraining it to an invisible actor instead of the character, and a few others.
It will take too long to do all this trial and error and I've recently gotten more work so I wanted to know if somebody already got a great formula for background movement and what behaviors did they use to achieve this?

What do you think? The only problems I had initially was that the background would eventually sink away if moving up to much, or move when the character is stuck while moving. Of course, I tried to solve this by constraining the background in some way to the characters x,y position. I calculated movement by making it go the opposite direction of the character at a fraction of the speed. Things I need to test but haven't gotten to are constraining it to an invisible actor instead of the character, and a few others.
It will take too long to do all this trial and error and I've recently gotten more work so I wanted to know if somebody already got a great formula for background movement and what behaviors did they use to achieve this?
Comments
Wow, thanks!