How to enable multitouch ? jsfiddle inside



I have two sprites (button_move and button_fire) with two touchs events. I want to have multitouch enabled : when i press on the same time on the two buttons, normaly the alpha of the two buttons is 0.5. But it’s not working.

I have follow the docs, especially this :

And i made a jsfiddle about it :

the full code is :

var config = {
    type: Phaser.AUTO,
    width: 480,
    height: 640,
    parent: 'phaser-example',
    input :{
    scene: {
        create: create,
        update: update

var game = new Phaser.Game(config);
var button_move;
var button_fire;
var flag_move=false;
var flag_fire=false;

function create ()

function update()
 if (flag_move){
 if (flag_fire){

Thanks for your help.

Countdown Timer

Hi @espace,
This is from Phaser docs:

By default Phaser creates 2 pointer objects: mousePointer and pointer1 .

You should put in your game config : activePointers: 3
Hope it helps. Good luck !! :grinning:

1 Like

Hey, add this before your input listeners: this.scene.input.addPointer(3);

1 Like

hi @jjcapellan and @Jake.Caron,

Finally it was so simple, thanks a lot both

i choose the solution from jjcapellan but the solution from Jake Caron works also


Glad it worked. It is a bit wonky that you need to have 3 active pointers to get 2 touch-points. I would have thought that pointer1 would be both the first touch and/or the mouse pointer.


Yes it’s not logical.