Godot Version
Godot 4.5
Question
Title. This is a 2D game.
Basically, I need to go from having this:
To having this:
The blank space will be taken up by the HUD, and the parallax is not affected by the offset.
Godot 4.5
Title. This is a 2D game.
Basically, I need to go from having this:
To having this:
The blank space will be taken up by the HUD, and the parallax is not affected by the offset.
No idea what Iām looking at, but an HBoxContainer should be considered. If the scene is built with Control nodes, this will be the simplest solution. Otherwise, a SubViewportContainer could be used.
What @zigg3c said. Create a Control node. Put your HUD on the right. Place a SubViewportContainer on the left. Then follow this tutorial: Using Viewports ā Godot Engine (stable) documentation in English
Using a canvas layer may suffice here.
Yeah that would work too. Just move the Node2D parent node to the left of the screen and put the HUD under a CanvasLayer on the right.
I came to a different solution: here, control nodes are used to alter the position of both the playfield and the HUD. I thought this made the most sense, since the HUD is supposed to slide in and out depending on what the current scene is. The HUD itself is a child of a pre-existing autoload used for screen shaders.
This is accomplished by using a Vector2 from a different autoload that handles player scores and rapid-fire capabilities, among other things.
