Godot Version
4.3
Question
I want to display a finish screen at the end of my level, however, to ensure the finish screen follows my camera I need to make it a child of the 2d camera which follows the player, which seems like a shaky solution. Am I wrong or is there a better solution?
1 Like
To implement a finish screen at the end of your level, you don’t need to make it a child of the camera. A better solution is to use a CanvasLayer. This node allows you to display UI elements (like HUDs, menus, or finish screens) independently of the camera, ensuring they stay fixed on the screen.
Here’s how you can do it:
-
Add a CanvasLayer node to your scene.
-
Move your finish screen (e.g., a Control node) under the CanvasLayer.
-
Show or hide the finish screen as needed using the visible property or the show()/hide() methods.
This approach decouples your UI from the camera’s movement, making it a more stable and flexible solution.
1 Like