Godot Version
4.2.2
Question
I’m having a problem with Subviewport world’s overlapping eachother
I’ve made a script that subdivides the main viewport into subviewports and they all share the 2D world in order to affect the same world.
it’s hierarchy looks like this
I’m making copies of the SubViewPortContainer and then resizing it based on the window size and what the grid of cameras dimensions are.
and the cameras within the subviewport are all position differently and should be interactable out of the players convenience. 3D minesweeper is cool but if on the 2d projection of it you need to pan 100 cells out to reach the next layer, it’s inconvenient.
The problem comes once i have this setup. The other worlds within the other subviewports are interactable despite the cursor not being within it
in the middle viewport it’s selecting that cell but panning the world and keeping it relative to the cursor
![Screenshot 2024-09-03 133824|690x402]
(upload://iP5ju7uLnKTcEzGt1eZUmBvl4WO.png)
the middle viewports world is selecting the highlighted cell off to the right
And i’ve tried ignoring input if it’s not focused but that ends up not being able to select anything at all because the out of field world is accepting input before the main viewport
And the cell is detecting input through a collisionshape2d as GUI through subviewports i saw was having trouble.