Hi,
Im sure this is a very beginne like question, but I guess i used the wrong keywords to find an answer.
I've read somewhere that you shouldn't Mix different Type of Nodes. Meaning ControlNodes should only consist of Controll Nodes - the same for 2D and 3D.
Is there any way to Mix them to show for example a particle effect on a panel where the mouse cursor clicked? (this is the intend behind this question)
I tried adding a Node2D to a Panel but I did not find a way to resize the Node2D which is my best guess why nothing on it is visible shown even when i use a simple draw_rect command.
Panther You can mix them although controls have some special properties that are inherited from other controls in the tree hierarchy. When you insert a regular node inbetween, this may get messed up.
However the Panel is not supposed to scale its contents, be it Controls or other types of nodes.
Thanks for the reply.
I changed some things and I gues I just have done things wrongly before.
So currently I use only Control Nodes. I just added a particle Scene (Name: "Test") and could use it like below.
So I guess I don't need to mix different kind of nodes.
And I know not to use Panels to try to scale content - Thanks again 🙂
`extends Control
var particle_instance
func _ready():
particle_instance = $Test
func _process(delta):
particle_instance.global_position = get_viewport().get_mouse_position()`
© 2022 - 2024 — McMap. All rights reserved.