Godot Version
v4.2.1.stable.official [b09f793f5]
Question
This is the first time I have used Godot. I’m a noob.
My game is located here: GitHub - jp31415926/godot_game: Testing godot game engine
My kids and I are playing around trying to write something like Five Nights at Freddy’s, except in a Sushi restaurant? Hey, as long as they are learning how to build a game and having fun, I don’t care. So I’m hacking something up for them to learn.
We are all learning Godot, if there are any blatant/stupid things in our approach, I’m very open to comments/criticism. Teach me!
Problem: I’m displaying a background sprite and panning the viewport left and right when the mouse is moved left or right of the window. There are buttons on the left and right that move with the background image, as desired. I have placed a CanvasLayer at the same level as the background image and the Camera2D, and I want children of the CanvasLayer to stay stationary as the viewport pans left and right. However, when I debug the game, the child nodes of the CanvasLayer are not displayed at all. Perhaps they are drawn under the other things??? Changing the Z order of various nodes didn’t see to make much difference.
Hint: When I enable “Follow Viewport” in the CanvasLayer, then the children ARE displayed, but they pan with the background image (which is not what I want and why I am using CanvasLayer to begin with).
I’ve sure I am doing something wrong, but I can’t figure out what.
I appreciate any help.
TIA!