I feel embarrassed, but after doing a lot of research I can't seem to be able to implement this simple feature. Can anyone here who's familiar with pixi walk me through how I might accomplish this?
Things I've tried... I'm trying to use .on('click', move)
and then I have the move function right now set to just return the value of the pointer. I can't even get my code to return anything, let alone move the sprite.
I've tried doing stage.on('click', move); and it just doesn't work. I get no errors in the console. nothing. It just doesn't work. After that, I tried creating a rectangle and using rectangle.on('click', move); I even fill in the rectangle with a color to make sure it's actually there. Nothing. my code is just unresponsive. No errors no nothing.
The only time my code works is when I use the .on('click', move) on the actual sprite I'm trying to move! sprite.on('click', move). It will then return 'undefined' indicating that I at least got that far...
I can provide my code if needed. But first I wanted to just check in and see what the best practice is for this, and if I'm just missing something elementary.