I wanted to track the mouse's current position, so I figured since MV already support mouse natively, this should be an easy task:
console.log(TouchInput.x, TouchInput.y)Unfortunately, what I found was that the coordinates only changed when I was holding down the mouse button.And then I saw this
Is there a reason why it was written this way?
console.log(TouchInput.x, TouchInput.y)Unfortunately, what I found was that the coordinates only changed when I was holding down the mouse button.And then I saw this
Code:
TouchInput._onMouseMove = function(event) { if (this._mousePressed) { var x = Graphics.pageToCanvasX(event.pageX); var y = Graphics.pageToCanvasY(event.pageY); this._onMove(x, y); }};