+1 vote

I can't get any _unhandled_input() from this setup:

scene tree

using _input()works, but I want the GUI to block input before letting the script handle it.

in Engine by (15 points)
edited by

1 Answer

+1 vote

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):

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.

by (1,371 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.