This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

So to specify, I am making a 2D platformer with some art assets from OGA. I have a parallax background that scrolls properly when I move from left to right, but when I drop down roughly 128 pixels the background does not move with the character.

I want to try and get the background to behave the way it does in the 2D Physics Platformer Demo

In this demo the background is fairly small compared to the rest of the level, but there is never a point in time where it moves out of the viewport. Can anyone point me in the right direction?

Below is a picture of what I am referring to:

enter image description here

And yes, I did make a post asking a similar question on the developer's forum a few days ago. Any help would be appreciated. Thank you in advance!

in Engine by (20 points)
edited by

3 Answers

0 votes
Best answer

I figured it out! I studied the Demo super hard and the answer was painfully obvious. On the ParallaxBackground node, in the inspector under "Scroll", there is a setting called "Base Scale". So to achieve what I was looking to do, I just needed to change the Y vector to 0. Now it looks exactly the way I want it! Thank you everyone for all of your input :-)

by (20 points)
0 votes

you need:

in this order:

ParallaxBackground Node

ParallaxLayer Node

by (111 points)

that does not work for me

That's how I have it arranged. It is set up in a separate scene actually. Then that scene is instanced into the main level node. Is the instancing bit where the error is occuring?

–1 vote

u have to flow this order parallax background,parallax layer, sprite for background set the
motion scale to zero set mirroring to screen width but this is not completely perfect becus ur background might break

by (189 points)

I had noticed while I was trying to adjust the settings that my background will now load in an odd manner if my character moves left or right through the level. By odd, I mean that it does mirror, but there will be blank space until a certain distance is traveled and then it will suddenly appear onscreen.

i dont know the solution to that
the only thing i did was to create the parallax background and add a sprite with the background texture to the player

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.