Because it is on a touchscreen device, where touch behavior is different to mouse behavoir, there is a different set of functions to use rather than mousePressed()
, mouseReleased()
and mouseMoved().
Namedly they are:
touchStarted()
touchEnded()
touchMoved()
Also the mousePressed
(mouseIsPressed
in p5) is touchIsStarted
.
It is documented here.