How can I know wich touch index pressed my TouchScreenButton?

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

This is for making two touch screen joysticks work properly. I’m doing a great mess trying to code a solution, but nothing lead me to great results :frowning:
I would be very happy if you could help me figuring this out :smiley:

:bust_in_silhouette: Reply From: yrtv

You do not need this information.

You need to know two things user touched in boundaries of some area (button), user changed input position while still touching the area (They pressed button and did not lift finger dragging it on screen). Area may or may not follow touch position(It may be just invisible area or analog stick imitation drawn on screen).

InputEventScreenDrag should do just fine.

Edit:
https://godotengine.org/asset-library/asset?category=&godot_version=3.2&sort=updated&filter=analog

Here they are. Control/Node2D based. (Editor build in search returns only one of this and not on every search. This may be a bug)