Preview parallax in editor

Godot Version

v4.2.1.stable.official [b09f793f5]


In my 2D sidescrolling game I have a few layers of parallax background/foreground sprites, but I often run into an issue when creating my levels where the position of the sprites I place in the editor will turn out to be very different in-game after I move my player to the place where the sprites are in the editor.

Example in-editor vs in-game:

Is there a way to preview in the editor how the parallaxing will look like when the player/camera is next to the sprites? It’s very cumbersome to set the parallax in the editor, run the game and move to the place where the sprites are located to check if they look good.

If you use a bunch of canvas layers with various scale factors instead of ParallaxBackground nodes, you can toggle View -> Preview Canvas Scale checkbox on top of the editor viewport. This will make all canvas layers move according to the camera position in the editor.

More details can be found in this excellent video by Nonsensical2D:

It kinda works, but it’s also not ideal because it scales the size of the sprites up/down, which doesn’t work in pixel art