![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | jobax |
Hi I have a player sprite you can move around with a camera as a child of this sprite, so the camera moves with it. What would be the best way of fitting a GUI (labels, text boxes, etc) into this zoomed view? I don’t really care about the GUI moving along with the camera as it only appears when you are stationary.
E.g. I have a colorrect node as a child of the camera which represents a text box, but I have to move it manually in the 2D space and it’s not aligned perfectly. The draw screen limits of the camera isn’t accurate e.g. I place the rect inside the camera “box” at the bottom in the 2D workspace but if I run the game, the rect will be more in the middle of the screen.
How do I properly do this within the camera view itself? Thanks.
Try looking for containers in the Godot docs, they might be what you need.
DodoIta | 2018-03-19 10:22
Thanks I tried that but the containers just don’t adjust properly while being a child of the camera node. If I put a camera in a container, the game just crashes.
jobax | 2018-03-19 22:30