New course! Every coder should learn Generative AI!
Try a free lesson+ 2
For different node touches, e.targetTouches would be better way to tie touches with nodes.
The difference:
e.touches: A list of information for every finger currently touching the screen.
e.targetTouches: Like e.touches, but is filtered to only the information for finger touches that started out within the same node.
The length of e.targetTouches is always 1 when there is only 1 figure touches a specific node.
Here a demonstration, try to touch and move the images and with 1 finger or multi fingers on a same image.
https://code.sololearn.com/WQvUl2BhQ0Xq/?ref=app