This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I'm making a mobile game and I want to be able to detect when the player touched the "empty" space of the screen. I mean, when he touched the screen but didn't touch any TouchScreenButton.
I've seen that this works just fine if I was using Control Nodes such as Buttons, because I could use Unhandled Input function to detect it, but that's not the case.
Is there any way to do that withou needind to check for positions and etc?

Currently using Godot Engine 3.2.

in Engine by (12 points)

1 Answer

+2 votes

You'll want to use the _unhandled_input function call and check for an InputEventScreenTouch event on the parent Control node you want to check on.
https://docs.godotengine.org/en/3.2/classes/class_inputeventscreentouch.html#class-inputeventscreentouch

by (654 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.