Kobaltic Posted February 22, 2014 Share Posted February 22, 2014 I am trying to get the x and y of the pointer (really when I click the mouse button or touch the screen) I tried game.input.x , game,input.isDown.x , game.pointer.x and so on and so on. I can't find anything that works. Thanks. Link to comment Share on other sites More sharing options...
Geaz Posted February 22, 2014 Share Posted February 22, 2014 You get the position of the pointer withgame.input.position.x/y Link to comment Share on other sites More sharing options...
Kobaltic Posted February 22, 2014 Author Share Posted February 22, 2014 Thank you that did the trick Link to comment Share on other sites More sharing options...
lessmilk Posted February 22, 2014 Share Posted February 22, 2014 If you want the input to work both on desktop and mobile, you should use game.input.activePointer And to get the x or y of it, simply do:game.input.activePointer.xgame.input.activePointer.y Link to comment Share on other sites More sharing options...
Recommended Posts