2

I have two draggables that work as a joystick. So, I have to be able to get one event in each joystick.

I am using a library called touch-punch but it is not multitouch. I have created my own listener but now I can't drag. Any idea?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

0

Use one event for both joysticks. Then use event.changedTouches[0].pageX; and event.changedTouches[1].pageX; to get the first and second touches.

lededje
  • 1,859
  • 1
  • 16
  • 25