morosenerd Posted August 6, 2014 Share Posted August 6, 2014 Hi! My default interface requires at least 2 touch pointers, but I could provide a slightly more awkward alternative with only 1 touch point requirement if I detect that the device does not support simultaneous touches. Two questions: 1) Can it be done with Phaser (or JavaScript in general)?2) Is it necessary anyway? I personally don't even know any devices with only 1 touch point, but I guess the templates that come with Phaser have .maxPointers = 1 for a reason. Are there many devices with only 1 touch point? Thanks for help. To clarify, my interface would be as follow:- touch left side of the screen to move left,- touch right side of the screen to move right,- you can't move left and right at once, but I want the 2nd touch (for example, right) to be detected even if the user is still touching left - this way I think it's slightly more responsive. Link to comment Share on other sites More sharing options...
WEB-HEAD-90 Posted August 9, 2014 Share Posted August 9, 2014 Hey morosenerd, Phaser states here how to use multiple touched: http://examples.phaser.io/_site/view_full.html?d=input&f=multi%20touch.js&t=multi%20touch&phaser_version=v2.0.7& Apparently, there are 2 touched enabled by default and you can use the method shown in that link if you need to add more. Hope that helps. Link to comment Share on other sites More sharing options...
morosenerd Posted August 9, 2014 Author Share Posted August 9, 2014 I know how to use multiple pointers, but I need to be able to DETECT if the device is CAPABLE. It seems that I actually skipped a crucial sentence in my post, sorry for the confusion. My question is: is it possible to detect the maximum number of touch points the current device can track at once (or at least: is it possible to detect if it's > 1). Bonus question: is there a significant share of mobile devices currently in use that can only accept one touch point. Link to comment Share on other sites More sharing options...
markergreen Posted May 29, 2015 Share Posted May 29, 2015 I'd guess that multi-touch support would be found in the game.device object.console.log(this.game.device.touch); Link to comment Share on other sites More sharing options...
joe2movies Posted June 20, 2017 Share Posted June 20, 2017 Hi I am new to Phaser and for my game i only need 2 touch at the same time. My game character can run left, right and jump. When i test using the keyboard the character can jump while running left or right. But when i use the touch screen while the character is running it can't jump. thanks Link to comment Share on other sites More sharing options...
Recommended Posts