Good morning.
This is my first Godot project (beside tutos) so I’m sure there’s an easy solution but…
I have an instance for “thought bubbles” which relates to a certain variable and then randomizes what it displays.
My problem: the label text is going over everything. This is the label text for both the instance (thought bubble) and the dialogue box.
I have tried adjusting collision layers, z-order, even changing the type of node that displays the text but no change.
Any advice for a beginner?
It looks like they are inside of a Control node named “Container” but not a Container node. A PanelContainer for example can contain your text while also drawing a background to it, using a Theme you can change the panel to match your artstyle.
Mixing Node2D and Control nodes may not be helping, what is the StaticBody2D for? Without that I believe you could convert this to use Control nodes instead
oh that’s embarrassing, i thought that was the default name.
i have changed the “container” to a panel container, but it did not change the text issue. i will try to convert everything to a control node for this scene to see if that resolves it.
the staticbody2D is to detect if the mouse enters the thought bubble (then it triggers an animation that minimizes the shape and causes it to queue free/disappear at the end of the animation).
is it poor form to have a mixture of nodes in the same scene?
If you haven’t yet, also reset all the Z-indexes you’ve set and keep Z as relative on, the default settings should work with a proper scene tree.
This can be done with control nodes, they also have a gui_input and mouse_entered signal that detects mouse over.
Nodes benefit from being children of the same type, 2ds and 3ds will inherit their parent’s transform, inserting a different type in between them will disrupt this transform and they will act in global space which is usually undesired. Control nodes take this further inheriting transforms as well as margin/spacing information, and Container types even further automatically sizing and ordering children nodes.
In general you should try to keep same-type children as much as possible.
thank you for the advice and information!
i eliminated the static body & collision and replaced it with a signal from the container : ) it’s working!
i’ll mark your post as the solution in a sec : D