kenray Posted May 16, 2014 Share Posted May 16, 2014 I need to be able to respond to inputs of 1 finger, 2, 3, 4, and 5 separately, so I add three pointers in the Create phase of my app (since Phaser comes with 2 already), and then run a CheckMultiFingers function whenever there's an 'onDown' event:game.input.addPointer();game.input.addPointer();game.input.addPointer();game.input.onDown.add(CheckMultiFingers, this);In testing to see the number of inputs and how they're structured, CheckMultiFingers runs this test code:var tDetector = (game.input.pointer1.isDown) + "/" + (game.input.pointer2.isDown) + "/" + (game.input.pointer3.isDown) + "/" + (game.input.pointer4.isDown) + "/" + (game.input.pointer5.isDown);console.log(tDetector);When I tap and release with one finger, I get: true/false/false/false/false like I would expect. When I tap and release with two fingers, I get: true/true/false/false/false also like I would expect. However if I then tap with one finger and release, I get: true/true/false/false/false which indicates 2 fingers instead of 1. I've tested with 3, 4, and 5 fingers, and what appears to be happening is that after my app initializes, as soon as I tap with 2 or more fingers, the first one gets "stuck" and is interpreted as being down, even when it isn't. I guess I could do an input.reset(false) after each release, but that would kill any of the input settings I've put on my sprites, right? Any suggestions on how to proceed? Link to comment Share on other sites More sharing options...
jpdev Posted May 17, 2014 Share Posted May 17, 2014 I would make a really reduced demo of this.(A text sprite displaying the status and the required events) If the problem persists in this small demo, put it online, link it here and also create a phaser-gitub-bug-issue. I am sure (since if you can reproduce it that way it is clearly a phaser bug) Rich will fix it in on of the next releases. Link to comment Share on other sites More sharing options...
kenray Posted May 17, 2014 Author Share Posted May 17, 2014 Thanks for the comments, jpdev - turns out that after I created the small demo, I can't get it to happen - so it must be something in my code... I'll be back if I can't resolve it... Link to comment Share on other sites More sharing options...
Recommended Posts