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?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    See if this demo from DeepBlueApps helps.
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    Free parallax template on my website should help :-)
  • FrantoFranto Member Posts: 779
    @Tatiang @Stormy Studio

    Wow, thanks! :) This will save me a lot of time. I'll give credit where credit is due for this help in the end credits.
  • FrantoFranto Member Posts: 779
    edited January 2014
    I must say that the solution arrived to to create is amazingly effective, I never would have thought of using the camera in the behaviors. I had been using groups for each direction, but this demo uses just a few lines to achieve the same effect with pure efficiency. I also had no idea scene attributes could be accessed.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You'll find that a lot with @DeepBlueApps. :)
Sign In or Register to comment.