`Hello !
I’ve been working on a drag and drop system that allow to place item on slots, and drag the around like you can see in the video. Everything works as intended, except when I put a VBoxContainer or HBoxContainer in a ScrollContainer. When I do so, the item I drag now are drawn behind the screen (or cut by the container’s border, something like that) when I drag them.
Sorry I should have been more precise. I know about z_index but for some reason there’s something going on with ScrollContainer that I don’t understand in terms of z_index.
Changing z_index does not seem to solve the issue.
In this hierarchy, for example :
It does not change anything.
Is there a something I should know about the way things are drawn when a control node is placed inside a VBoxContainer, and the VBoxContainer inside a ScrollContainer ?
I feel like the issue is based on a behavior of certain nodes, like, apparently, ScrollContainer (though I might be completely wrong).
What is weird do me is that if you look at the video, it seem to be drawn under the actual “screen” (I don’t know how to call it, the default grey frame of godot)… Like… why?
EDIT: Apparently I can solve the issue by checking visibility → top_level
I don’t know like this solution, though… Because now my item will appear somewhere else for a few frame and go back to my mouse (they will travel there)…
I’d like to have an explanation if someone is interested in giving me one, I love to learn about that stuff.
Yeah sorry didnt fully watch your video. The scrollcontainer has a property called “clip_contents”, which i guess is what makes the node disappear when it leaves the scrollcontainer, because its still considered as a child of the scroll container.
You can try to set this value to false and see if anything changes