Jump to content

Snap Event


Recommended Posts

could you elaborate on how you are moving your sprite and how it is snapping?


not sure exactly what you need to do but take a look at this



every time my sprite passes through the intersection of lines, i set the alpha to 1


i check this by taking the modulo of the x & y with the grid

if(s.x%grid===0 && s.y%grid===0) {

and here's a totally different example ..



if i drop the sprite (top left corner) on 320,320 it does something

function onDragStop(s) {    if(s.x==320 && s.y==320) {

it really depends on what is causing your sprite to move, and what result you need. please clarify.


do you actually want to fire a Phaser.Signal event?

Link to comment
Share on other sites

  • 8 months later...

  • Recently Browsing   0 members

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