shinning91 Posted January 20, 2017 Share Posted January 20, 2017 (edited) Hi guys. I am currently having a problem trying to disable multitouch function on IPad. I tried using this.game.input.maxPointers = 1; but it doesn't seems to limit number of active pointers as I still able to multitouch. Are there any other way to disable it? Edited January 23, 2017 by shinning91 Better wording Link to comment Share on other sites More sharing options...
ITpaolo Posted January 20, 2017 Share Posted January 20, 2017 game.input.addPointer(); is 1.) If you do: game.input.addPointer(); game.input.addPointer(); game.input.addPointer(); This are 3 Multi-Touches limited to 3 Example in here: https://phaser.io/examples/v2/input/multi-touch I dont know your methode & I didn't see this for ever. :-P #ImPhaserNoobCorrectMeIfImIncorrect EDIT: So If you want to disable it, just comment it out with /* */. e. g : /*trap: function (sprite, Floor) { var tween = game.add.tween(Floor).to({kill: true}, 1000, Phaser.Easing.Linear.None, true); tween.onComplete.add(function () { Floor.destroy(); }); }, checkOverlap: function (sprite, Floor) { var boundsA = sprite.getBounds(); var boundsB = Floor.getBounds(); return Phaser.Rectangle.intersects(boundsA, boundsB); },*/ Link to comment Share on other sites More sharing options...
samme Posted January 21, 2017 Share Posted January 21, 2017 23 hours ago, shinning91 said: but it doesn't seems to limit number of active as I still able to multitouch. What do you mean — you do what and what happens? Link to comment Share on other sites More sharing options...
shinning91 Posted January 23, 2017 Author Share Posted January 23, 2017 On 1/21/2017 at 4:54 PM, samme said: What do you mean — you do what and what happens? I wanted to disable multitouch function for my game. By default, Phaser starts with two Pointers so I tried using this.game.input.maxPointers = 1; which supposing limit the number of active pointers based on the documentation in Phaser /** * @property {integer} maxPointers - The maximum number of Pointers allowed to be active at any one time. A value of -1 is only limited by the total number of pointers. For lots of games it's useful to set this to 1. * @default -1 (Limited by total pointers.) */ this.maxPointers = -1; But it doesn't seems working as I still able to multitouch. Are they any other way to disable it multitouch function? Link to comment Share on other sites More sharing options...
samme Posted January 23, 2017 Share Posted January 23, 2017 It should look like this (touch w/ several fingers): Link to comment Share on other sites More sharing options...
shinning91 Posted January 27, 2017 Author Share Posted January 27, 2017 @samme Thanks for the reply. Not sure what I did but using game.input.maxPointers = 1 somehow works where it did not before this. The problem has been solved. Link to comment Share on other sites More sharing options...
Recommended Posts