rexrainbow / phaser3-rex-notes

Notes of phaser3 engine
MIT License
1.2k stars 260 forks source link

Tap is delayed and settings have no effect on responsiveness #350

Closed vinny-888 closed 1 year ago

vinny-888 commented 1 year ago

How can the tap happen instantly?

Right now the tap is delayed

Setting these has no effect

time: 1,
tapInterval: 1,
vinny-888 commented 1 year ago

I was able to just use this for instant triggering

this.input.on('pointerdown', function(pointer, localX, localY, event){ 
      this.tapped = true;
    }, this);
rexrainbow commented 1 year ago

Tap event is fired when pointerdown then pointerup very quickly, and it will has a delay to distinguish next tapping. To discard next tapping detecting, you can assign taps parameter of constructor config, ex:

scene.rexGestures.add.tap({
    //...
    taps: 1
});