You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I override input on a node that is a child of a subviewport that is "unfocused", it doesn't receive mouse inputs, yet still receives keyboard inputs and actions.
A few updates ago it was working as intended and I don't know what happened to make it stop working.
Steps to reproduce
Make new project
make a scene with a tabcontainer and two subviewports as its children
give one of the subviewports a sprite2d and override its _input to make it green when there's mouse input and red when there's keyboard input
notice that mouse input is not received by the sprite2d when its parent subviewport is unfocused
minimal reproduction project instructions
middle mouse to drag the camera
left click to randomly teleport the camera
WASD to move the camera
notice that the camera doesn't receive mouse input when its parent subviewport is unfocused
This was intentionally changed in #58334 in order to fix #28833 and #39666. (Basically unrestricted mouse events in SubViewports led to multiple issues)
If you need these events in unfocused SubViewports, you need to override _input or _unhandled_input of the respective SubViewportContainer and handle event-propagation for mouse events to the SubViewport yourself.
Let me know, if you need an example of how to implement this.
oh,
well i guess the only thing i can do now is workaround it and cross my fingers that the godot devs will add a setting for subviewportcontainers to allow propagation
Godot version
v4.0.rc1.mono.official [8843d9a]
System information
Windows 10, Vulkan, Nvidia RTX 2080 TI
Issue description
When I override input on a node that is a child of a subviewport that is "unfocused", it doesn't receive mouse inputs, yet still receives keyboard inputs and actions.
A few updates ago it was working as intended and I don't know what happened to make it stop working.
Steps to reproduce
minimal reproduction project instructions
Minimal reproduction project
subviewportinput.zip
The text was updated successfully, but these errors were encountered: