1 decade ago by norashishi
Hi, I'm reporting the issue ig.Input.mousemove doesn't handle proper coordinates with mobiles when the browser is scrolled. I always have to inject some code like below to fix it. Hope the engine side can solve this issue. Thank you!
Sample
http://noragames.com/gallery/impactjs-mouse?lang=en
ig.Input.inject({
mousemove: function( event ) {
this.parent( event );
if( ig.ua.mobile ) {
this.mouse.x -= (document.documentElement.scrollLeft || document.body.scrollLeft) / ig.system.scale;
this.mouse.y -= (document.documentElement.scrollTop || document.body.scrollTop) / ig.system.scale;
}
}
});
Sample
http://noragames.com/gallery/impactjs-mouse?lang=en
