Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

game.input.position not correctly updated when listening touchmove


Recommended Posts



I'm trying to retrieve the pointer position in Phaser when the mouse is moving hover the body - it works well when listening "mousemove" but when I listen "touchmove" the value is never updated and remains the same as the first time the callback function is called.


Any idea why ?


Thank you

window.onGameBuildingClick = function(ev){    ev.preventDefault();    if (Modernizr.touch)        dom('body').on('touchmove',onMove);    else        dom('body').on('mousemove',onMove);};window.onMove = function(ev){    log(game.input.position.x + " - " + game.input.position.y);};
Link to comment
Share on other sites


  • Recently Browsing   0 members

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