Jump to content

Touch position troubles


Recommended Posts



I'm new to Phaser and I really enjoy it.

I made a game which uses keyboard and it works well.


I now have some troubles trying to use the touch events on my smartphone.

I want to get my finger's position and tried in the create() function :


pointer = game.input.addPointer();


Then in the update() function :


game.input.onDown.add(doSomething, this);


function doSomething(pointer){

debugText.text = game.input.pointer1.clientX;


But it constantly gives me -1. How can in get my finger's position ?

Link to comment
Share on other sites


  • Recently Browsing   0 members

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