Hello everyone! I am a beginner learner and for a while now I've been stuck on the Godot Parallax system (ParallaxBackground and ParallaxLayer). I have watched many tutorials on YouTube, but haven't seen anyone end up with the same problem as mine. I hope to get some insights and understand what I am doing wrong.
My goal is to get a simple parallax effect where every layer moves at a different speed like in most 2d platformers.
I have a player with a basic x and y movement script and a Camera2d node as a child of the player. I've created ParallaxBackground, added several ParallaxLayers with sprites attached to them, and changed the values of the Motion scale as it says in the documentation (as well as many tutorials that I've found).
Now my problem is this: When I run the project, all of the sprites of the ParallaxLayers with assigned motion scale values (e.g. 0.2, 0.5) change the location on the screen even before I start moving the Player. Even though the parallax is working, the positions of the sprites are stretched to the right of the origin point (initial camera position) and it completely messes up the composition of the level. My Godot version 4.2.1.
I've been experimenting with the ParallaxBackground properties trying to understand the problem and when I enable the "Follow Viewport" option I get a normal parallax effect (even though it messes with my player's position on the screen).