ParallaxLayer motion offset causing "pop in"

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

I am trying to make my background/foreground clouds of my scene have a parallax scroll effect for a game I am trying to make. The issue I am having with it is I am getting this pop in effect when it seems to reach its width bounds. I have searched and messed with settings based off on similar posts but I haven’t been able to fix it. I recorded a small clip of it to show what it looks like (basically happens at the 10 second mark but I shortened it in the gif to save peoples time).

Gif of pop in - Imgur: The magic of the Internet

This is my project settings / window settings - Imgur: The magic of the Internet

Foreground Clouds Sprite Settings - Imgur: The magic of the Internet

Background Clouds Sprite Settings - Imgur: The magic of the Internet

Background Clouds Import Settings - Imgur: The magic of the Internet

Foregrounds Clouds Import Settings - Imgur: The magic of the Internet

Script example:

extends ParallaxLayer

export(float) var CLOUD_SPEED = -15

func _process(delta) -> void:
    self.motion_offset.x += CLOUD_SPEED * delta

This is from BitBrains Parallax Background Tutorial.

Any help would be appreciated.

  • TheSnowmannDev

can you send the properties of the parallaxlayer?

Shiva | 2022-01-22 16:47

BackgroundClouds ParallaxLayer settings - Imgur: The magic of the Internet
ForegroundsClouds ParallaxLayer settings - Imgur: The magic of the Internet
YouTube Example of what is happening - https://youtu.be/ay82XIktzag

Thesnowmanndev | 2022-01-22 19:08

:bust_in_silhouette: Reply From: Cogan

You have to import the textures with the flag “repeat” set to enabled in the import tab
Press “reimport” after setting repeat to enabled as shown.
https://imgur.com/a/7b1R7Mw

They are set to repeat. You can see in the import settings pictures that I had it set to enabled.

Thesnowmanndev | 2022-01-22 15:27

:bust_in_silhouette: Reply From: Thesnowmanndev

I figured out the issue. Because my sprites were 240x135 and I was using the GSL2 project setting it did not like that when I set the repeat to enabled because it couldn’t scale in a power of two. Once I swapped to GSL3 the issue was solved. I also changed my Project Window > Size > Width to 240 and Height to 135 with the Test width and height of (240x4) x (135x4).