It can be done with this code:
var point_pos = Vector2(0, 0) # Position will be here as Vector2
func _input(event):
if event is InputEventScreenDrag:
point_pos = event.position
It will works only with drags. If you want to handle single-point tap or touch, you should use InputEventScreenTouch
. So you can use that event types together:
if event is InputEventScreenTouch or event is InputEventScreenDrag: