Random beginner-question #1: Emulate Mouse From Touch

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

Hi everyone,

my simple scene is just a Node2D. I set a “mousebuttonclick” in the “InputMap (Device 0, Left Button)” and turned on “Emulate Mouse From Touch”.

My script:

extends Node2D

func _input(event):
	if event is InputEventMouseButton:
		if event.is_action_pressed("mousebuttonclick"):
			print("clicked!")

		if event.is_action_released("mousebuttonclick"):
			print("released!")

The mouse-click works as expected, but touching does not respond, even if I change to InputEventScreenTouch (I’m testing on a PC touchscreen and on an adroid phone).

What am I doing wrong? Any suggestions?

EDIT:
Easy fix: changing Device 0 to All Devices, done.