Jump to content

What does alphaThreshold mean in Phaser.InputHandler.enableDrag()?


Recommended Posts


If using pixel perfect collision this specifies the alpha level from 0 to 255 above which a collision is processed.

If you want pixel perfect collision and your image has alpha channels (partially or fully opaque colors) you can specify which pixels to consider COLLIDEABLE in the sprite.

0 - all transparent pixels are collideable

255 - pixels without transparency are collideable only

128 - pixels that are only 50% visible (and above, up to non-transparent) are considered collideable.


Since this is in the context of draggable sprites I'd assume this also affects whether you click on a transparent part of the sprite and it drags or not.


I hope it helps, I've described it to the best of my abilities

Link to comment
Share on other sites


  • Recently Browsing   0 members

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