Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DodoIta | |
Old Version | Published before Godot 3 was released. |
I’m trying to detect multitouch for a maximum of two touches simultaneously.
My problem is I can’t even detect a touch. I’ve tried this code sample to test if it works
func _input(event):
if event is InputEventScreenTouch and event.is_pressed():
$Label.text = event.position
… and compiles but doesn’t work (I tested it on a mobile device, of course).
I know this has been asked many times, but never for Godot 3.0 and I’ve got no idea how to use the InputEventScreenTouch class.
Also, is there another way to detect multitouch?