Jump to content

Detecting if the pointer is a click or scrolling


Recommended Posts


I try to develop a game compatible desktop and mobile, but I am faced with a big problem.

I managed to handle the scroll of the camera with this great plugin: http://jdnichollsc.github.io/Phaser-Kinetic-Scrolling-Plugin/

Now I would like to handle the click, in addition to the scroll.
I'm comparing pointers in the update function, but no way to differentiate the click pointer and the first pointer of the scroll (the following is good)

 I'm am already able to detect the first click of a scroll compared to the next with isClick param on :

this.game.input.addMoveCallback ((point, x, y, isClick) => {})

But nothing to differentiate a simple click of a first click on a scroll event :(

I tried with a setTimeout but I not get a great result. Any other ideas ?

Thank you :)

PS: Sorry for my english (i'm french ^^")

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...