how do i get the position of each finger i press on the screen

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

how do i get the position of each finger i press on the screen

:bust_in_silhouette: Reply From: Wakatta
func _input(event):
    if event is InputEventScreenTouch:
        if event.is_pressed():
            var position = event.position

Yes that is the expected behavior. For other use cases you will need to store the positions

var touches = {}

func _input(event):
    if event is InputEventScreenTouch:
        var key = str(event.index)
        if event.is_pressed():
            touches[key] = event.position
        else:
            touches.erase(key)

Wakatta | 2021-08-03 00:34