I’m setting up an scene with a SubViewportContainer that has 2 SubViewports that have different interactive scenes in them. Input to both of the viewport scenes works OK, but the problem is that both SubViewport scenes handle the same input at the same time.
I was expecting for the top most subviewport to handle the input, and then the one below, but the way SubViewportContainer works is that it propagates the input to both subviewports at the same time.
Is there a way to handle the input so I can check if it’s been handled by a node in the first subviewport, it doesnt propagate to the second one?
I was thinking of handling the input at the Container level, but I don’t know how to either send the input to a subviewport, and check if the input was handled or not to see if it needs to be sent to the second subviewport.
Currently this is a limitation of the engine, which is not easy to implement.
One complexity is that physics picking happens asynchronously. So in a first step it is decided, which Viewports should receive the input event and afterwars in a second step, physics picking for all of these Viewports are evaluated independently from each other.
An additional complexity is that the order in which viewports handle events is not easily configurable: