How to detect touches that were not on a TouchScreenButton?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wallaby

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.

:bust_in_silhouette: Reply From: andersmmg

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.