could there be any reason why an area2d(whose signal is attached to a sprite2d) does not receive mouse inputs if nested inside a bunch of control nodes, when all control nodes have mouse filters set to ignore?
there are no errors, and the root node is a node2d. if I attach the code to handle the mouse inputs to said root and connect the area2d's signal to it, it works, but I only want the sprite2d to be affected by the mouse, not everything else. yet mouse clicks are not being registered.
in the 'misc' tab under debugging, nothing shows up either, so I'm stumped. any ideas? please let me know if you need more info.
#[SOLVED] control nodes set to 'ignore' still blocking mouse input?
20 messages · Page 1 of 1 (latest)
if input_pickable is set to false or it isn't in any collision_layer.
the object is set to pickable, and it has collision shapes attached to it
everything works if I attach the same code to the root node
you can also check if any ui-node eats those inputs by calling get_viewport().gui_get_hovered_control()
oh, is that different from the misc tab under debugger?
i don't know.
nothing shows up next to 'clicked control' so I'd assume things are working as intended, yet the area2d still doesn't register inputs
she code i showed will give you a control-node if that's what currently is considered to be hovered by the mouse.
sorry, where does that show up?
I assume it's supposed to look like this?
regardless, nothing happens if I add that code- unless I'm setting it up wrong- and nothing shows up here when I click the UI, meaning the control nodes are being ignored as intended (I assume)
this is what my code looks like. adding this code to the inv_ui_slot root node makes everything work as intended, except it takes everything in this scene, which is not what I want
it returns the node, so you would have to do something like print(get_viewport().gui_get_hovered_control())
but it would probably return the same as this one.
i don't quite understand what you're saying. so you originally connected the signal to the root node2d instead with nothing else changed and it worked?
yup.
absolutely no clue what could be wrong, starting to wonder if it's a bug
very bizarre. I had someone else today with a simlar issue, so it's not unlikely.
in my experience the built in input detection of collision shapes isn't very reliable when it comes to detecting the shape. what i did instead wat using a raycast with the length 0 and hit_from_inside set to true.
Might help you as well.
thank you for the help! I managed to solve the issue by making each inventory slot its own scene independant of the draggable item. I feel silly at how simple that was, but workaroud or not the problem is solved and that's good enough for me 