Jump to content

Phaser.InputHandler and the use of snapOffset


Recommended Posts



I have recently started prototyping with Phaser and love how easy it is to work with! Currently I'm making use of the click, drag, and snap capabilities of the InputHandler. By default my sprites always snap with a grid relative to x:0, y:0. This is not the behavior I would like, I would rather snap to a grid that is relative to some other point.


I noticed that this class has a snapOffset property which looks to solve my problem. But after looking through the source code this property doesn't seem to have been implemented. For now I have a custom Phaser.InputHandler.stopDrag which adds in the offset on release.


Am I misusing snapOffset or has this feature yet to be implemented?



Link to comment
Share on other sites


  • Recently Browsing   0 members

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