Jump to content

Internet Explorer - mouse click doesn't work


piotr409
 Share

Recommended Posts

if (game.input.mousePointer.isDown) {if (playerPower < maxPlayerPower)playerPower++;onMove = 1;} else if ((onMove == 1) && (game.input.mousePointer.isUp)) {onMove = 2;sprite.body.velocity.y += Math.round(Math.sin(sprite.rotation + 1 / 2 * Math.PI) * 1000) / 1000 * (-playerPower);sprite.body.velocity.x += Math.round(Math.cos(sprite.rotation + 1 / 2 * Math.PI) * 1000) / 1000 * (-playerPower);}

Works on Chrome, doesn't on Internet Explorer 11. 

Maybe there is different method to use for IE?

I'm using dev branch.

 

Test live here : 

http://japiotr.pl/gravity-test/

Link to comment
Share on other sites

  • 8 months later...
  • 3 weeks later...

@G3n3ralTao:

The issue seems to be that the click is not reported as a MouseEvent by IE11, but as a PointerEvent. Those seem to be handled by game.input.pointer1 instead of input.mousePointer. While the the mouse button is down, movement is reported by a PointerEvent as well. Using input.ActivePointer instead of input.mousePointer fixed the problem for me.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...