How to detect multitouch on 3.0

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DodoIta
:warning: 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?

:bust_in_silhouette: Reply From: DodoIta

Okay, regarding the Label not printing, that’s because I didn’t cast its argument into a String, so

`$Label.text = String(event.position)`

displays the event’s potition correctly.

Also, I’ve done some testing and it appears that only InputEventScreenTouch and InputEventScreenDrag are capable of detecting multitouch.

This is not much, but I hope it’ll help someone.