+3 votes

I have a following scene setup:
-ParallaxBackground
--ParallaxLayer
---Sprite

I have set the mirroring property of the layer to the image's horizontal resolution, and thus have managed to get the parallax background to work, but only 2 images are drawn at a time. That means that there isn't actually an infinite background, only 2 images that sort of teleport to the right as the camera moves along (to the right also).
I have noticed that this doesn't happen if I resize the sprite to fit the entire screen. Then the player will never see the images being drawn to the right. But if I have a sprite that is smaller than the screen, then the 2 image limit becomes visible.

I would like to know how to get more than 2 images to be drawn at a time when using ParallaxLayer/ParallaxBackground.

in Engine by (141 points)

Having the same issue. But that is not the only one. When the camera is moving into negative coordinates, the parallax layers stop moving. Even in a positive direction. They come to a point where they stop.

I have the same problem.

2 Answers

–2 votes

Hi, try Z Index = -100 at the Inspector in the editor
good luck!

by (195 points)
+1 vote

you need to modify the sprite settings ...

select your ParallaxLayer sprite, select region, enable region and for the x,y,w and h values put 0, 0, screenwidt in pix, screenheight in pix ...

the x, y are the coords where the parallax background will start and the w and h are to where it will expand, so 0,0 starts at the top left pixel and then will expand to i.e 720 and 1280 ...

one last thing ... don't use alpha when tinting the sprite, it will cause drawing issues

i know this reply is late but i hope this helps in the future, feel free to contact me

by (16 points)
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 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 webmaster@godotengine.org with your username.