0 votes

I have set up my scene like in this screenshot:
Scene setup
The Player-scene has a Camera2D as a child.

In the editor I can see Sprites from the PalallaxLayers, but when I start the Scene only the Tilemaps and the Player are visible. What am I missing?

Godot version 3.4.2
in Engine by (47 points)

1 Answer

0 votes

You might wanna put your whole parallax system inside a canvasLayer node, so that it's not affected by the camera.. at least as a test.

Without more information it's hard to know what the issue might be. If you run the game, you can click the "remote" button where the scene tree panel is and it will allow you to play with the runtime tree as it is in the game right now, and you can select each node and see if maybe the position is way off... Or maybe visibility is turned off... Or some other setting.

by (1,290 points)

Interesting… When I inspect the tree with the "remote" button while the game is running I see that the Positions of the ParallaxLayer-Nodes are completely borked… In the editor inspector the position is (0, 0), but in the "remote"-inspector it is (-140, 400). There is no code in my game that would move these nodes.

It's probably the camera moving them. Try putting them in a canvas layer... Or playing with the parallax settings on each parallax node

Putting the ParallaxBackground-node inside a CanvasLayer-Node does not change anything in the result.
The Camera is just a stock Camera2D with current == true and the left limit set to -100. Otherwise everythin is default. I don't get why the backgrounds would be moved.

By the way, when I manually move the ParallaxLayer-Nodes by +140, -440 they also dont appear in the correct position where they should be in the editor.

Oh damn… I just got it. I used very low resolution assets, because it was easier to take those and scale them up by 3 in the engine than to create bigger assets.
I had the scale inherited by the CanvasLayer in ParallaxBackground set to 3 on x and y, this messed everything up.
I just scaled the assets to my project size in an image editor, reset the scale in ParallaxBackground and now everything works as intended.

Still feels like a bug though…

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 webmaster@godotengine.org with your username.