0 votes

Hello guys,

I searched the almost entire internet and I found only infinite parallax background demos. That were great btw...however I need solution of scroll out/in parallax background because it would be the game levels (or scenes, depends on terminology). I have a solution but no satisfaction for me....

This is the scroll in mechanism:

    if(self.position.x >= 2100):

    for elem in City.get_children():
        elem.visible = true

...and this is the scroll out:

    if(self.position.x >= 8300):
    for elem in City.get_children():
        elem.motion_scale.x = 1
        elem.motion_mirroring.x = 8000

Furthermore, the mirroring of parallaxLayer is 2000 and default visibility is false as well as the whole background is inside the player's scene. This means the self.position is position of the player.

Godot version 3.4.2
in Engine by (12 points)

Please log in or register to answer this question.

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.