Godot Version
v4.3.stable
Question
Enabling Object Picking in SubViewport stops mouse scrolling from being forwarded to the parent control node. How can I have both in my game, object picking and mouse scrolling inside a scroll container?
Here is a minimal example to reproduce the situation. I set Object Picking to true in the SubViewport and duplicated the SubViewportContainer a couple times to create a need for scrolling.
Try setting your subviewportontainer mouse filter flag to MOUSE_FILTER_PASS
this should allow mouse events to propagate to other controls.
The default is MOUSE_FILTER_STOP
which sounds like the behavior your experiencing.
Thanks, but the default for SubViewportContainers is already MOUSE_FILTER_PASS. Also, scolling works just fine when Object Picking is set to false, so this can’t be a Mouse Filter issue.
Okay i suspect then, when the viewport is in focus ( like when you click for object picking), it begins to capture all input. Maybe you could potentially wait for the mouse release to happen and some how force the main viewport back into focus or inject inputs into the sub view port avoiding the focus change altogether.
I dont know how to do this off the top of my head, or know if its possible, but input is viewport based.
Of try setting the focus_mode to FOCUS_NONE on the SubviewportContainer