Godot Version
4.4
Question
I have a button in my scene tree which is only handling events from the main viewport. The tree is roughly
- Button
- CanvasLayer
- SubViewportContainer
- SubViewport
- Camera2D
Button is on multiple visibility layers. The main viewport is looking at layer 1, subviewport at layer 2. Button input is handled fine from main viewport (i.e. can be clicked) but not from the subviewport.
I can see using either the debugger, or a _input/1
call that the subviewport is receiving events okay, but these are not being received by the button. I.e., attempting to click the button through the subview port shows ‘clicked controlled’ as SubViewportContainer, where as through the main viewport shows Button.
Any ideas?