monkey2 icon indicating copy to clipboard operation
monkey2 copied to clipboard

Small conflict Mouse vs Touch using emscriptem on Touch device

Open abakobo opened this issue 7 years ago • 0 comments

On a touch device running an emscriptem mx2 app, the "Mouse" constant will return Mouse.ButtonDown(MouseButton.Left)=True while touched but the Mouse.Location will be (0,0) so it is not usable for that device+target combination (mobile+emscriptem) Touch is working great though, but the mouse is not activating touch.

So it would be nice if Mouse.Location() was returning the touch position of Finger(0). Or, if not possible, that Mouse.ButtonPressed/Down/Released was not returning true when the screen is touched.

This would avoid some hacky control code lines (if Mouse.Location<>Vec2(0,0)) when dealing with emscriptem apps as they are supposed to be used on both desktop and mobiles and there is no way (afaik) to know for sure if we are on a desktop or a mobile when running an emscriptem app.

abakobo avatar Mar 21 '18 10:03 abakobo