Recognize screen touch input event

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

I’m trying to recognize touch input via InputEventScreenTouch event. The problem is I don’t know how to do this. My (non-functional) code so far:

func _unhandled_input(event):
  if event.action_match(InputEvent.SCREEN_TOUCH):
    #do stuff
    pass
:bust_in_silhouette: Reply From: ville

Found a solution!

func _unhandled_input(event):
  if event is InputEventScreenTouch:
    #do stuff
    pass