Creating a stationary background

Godot Version

4.2

Question

I want the backgrounds in my game to behave like the one in sonic & knuckles’ Death Egg Zone - as you move around the level, the background is stationary. The entire background image takes up only the screen, and doesn’t move as you move.

Presently, I have the camera as a child of the player character, which has a canvaslayer as a child, and the canvaslayer has a texturerect as a child. The canvaslayer is used to ensure the background draws behind all other visual information.

Player
    Camera
        CanvasLayer
        Texturerect (actual background image)

This works fine, but is going to require some coding to load a different background image whenever I change levels. That’s not much of a pain in the ass, but my question is…

Is there a way to make the background a child of the level instead of the player character, and still achieve this functionality?

I think you can give it a canvas layer parent to prevent the camera’s influence anywhere

How do you mean?

2024-09-29-003038_250x124_scrot

When attempting this I found that the background image would either not follow the player and you would see the default gray, or it required blowing the background up to match the size of the level, which zooms in and basically shows no detail.