Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

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!

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

1 decade ago by norashishi

Ah, this issue seems to be fixed on 1.22. Silly me.
Page 1 of 1
« first « previous next › last »