Parallax Background problem

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By selamba

I have a following scene setup:

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.

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.

bitbotzgames | 2020-05-18 18:53

I have the same problem.

gregöpl | 2021-03-14 09:46

:bust_in_silhouette: Reply From: Jorge

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

:bust_in_silhouette: Reply From: kakerlaka

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