Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | voxelv |
I can’t get any _unhandled_input()
from this setup:
using _input()
works, but I want the GUI to block input before letting the script handle it.
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | voxelv |
I can’t get any _unhandled_input()
from this setup:
using _input()
works, but I want the GUI to block input before letting the script handle it.
Reply From: | Xrayez |
Unfortunately, there’s a bug that doesn’t allow ViewportContainer to forward unhandled input to its viewport children and only works for _input()
right now.
As a workaround, you can try to forward the _unhandled_input()
manually to viewport by extending ViewportContainer
like so:
extends ViewportContainer
func _unhandled_input(event):
$Viewport.unhandled_input(event)
This will allow to forward any unhandled input received by ViewportContainer
to Viewport
, hence to your custom camera node.
See the relevant issue pertaining to your question.