Does anyone know how to track the location of touch inputs? Only JavaScript and HTML | Sololearn: Learn to code for FREE!

+2

Does anyone know how to track the location of touch inputs? Only JavaScript and HTML

I need to update the location of a canvas object with the location of a sliding/moving finger that's touching the screen....

4/6/2019 9:20:56 PM

Ayden Cook

3 Answers

New Answer

+10

You can change the eventListener to "mousemove" for sliding :) https://code.sololearn.com/WHn4CWGdYYgo/?ref=app

+2

Try this https://codeburst.io/the-only-way-to-detect-touch-with-javascript-7791a3346685

+1

Try this! https://code.sololearn.com/W8MufrMlkQIa/?ref=app