We are about to switch to a new forum software. Until then we have removed the registration on this forum.
First of all i am new to p5.js. So hopefully i am at the right place.
How to move player in x-axis with using touch function,here player can be any object drawn on the canvas. Now the problem i am facing that where ever i am touching player is poping up there but i want it to move/slide only when i slide my finger irrespective of on which part of screen i am sliding or touching. :)
Answers
@ssuman2 -- please provide example code for feedback -- and format the code in your post using CNTRL+o.
It sounds like you are assigning the x,y of the player based on mouseX, mouseY (or the current touch point).
Instead, you might want to do something like this: