1 decade ago by erfuller
So I have some code for moving something around with the mouse, which is using ig.input.state() to determine if the mouse button is currently down, and that part is working great.
However, if you drag your finger off the canvas on mobile, or click and drag off the canvas, the state remains down, and the mouse x,y returned doesn't change from the last good position in the canvas, so my game thinks their finger/mouse is being held down on the edge of the screen.
How do I tell when the mouse has left the canvas?
Thanks,
However, if you drag your finger off the canvas on mobile, or click and drag off the canvas, the state remains down, and the mouse x,y returned doesn't change from the last good position in the canvas, so my game thinks their finger/mouse is being held down on the edge of the screen.
How do I tell when the mouse has left the canvas?
Thanks,