Naylo Posted December 7, 2014 Report Share Posted December 7, 2014 Hello, 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 ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.