So I have been trying to wrap my mind around touch controls.
For example, let’s say I place my finger on the screen and then move it to the right, it should know I’m moving to the right, and then from there if I move my finger to the left it should know that too, but the part I’m not sure how to determine is when my finger just stops and doesn’t move. Not sure how to get a function in that situation.
I got it to know when I’m moving right to left, but perhaps my way of doing it isn’t smart. And not sure how to fire off something to know when it’s stopped.
Unfortunately, there is no such touch event that would be constantly performed when you hold your finger on the screen without moving it. However, you can implement your own logic for this event. To do this, you need an update method that provides a playсanvas, a counter that will record the finger hold time and the value of the time interval, which is needed to run your code. I quickly assembled the scene here: https://playcanvas.com/editor/scene/782051