SidR Posted December 4, 2020 Share Posted December 4, 2020 Hi Guys, I am quite new here, I am trying to implement drag and drop and the drag event alone isn't firing.[dragstart and dragend are working] below is the code. Can someone help me to figure out the issue, this.tile = this.add.image(this.cameras.main.width * initialX,this.cameras.main.height * initialY,this.puzzlePiecesArr[index]).setScale(0.1).setInteractive({ draggable: true }); this.input.setDraggable(this.tile); this.tile.input.draggable = true; this.input.on('dragstart', function (pointer, gameObject) { gameObject.setTint(0xff0000); }); this.input.on('drag', function (pointer, gameObject, dragX, dragY) { console.log("gameobjectDrag",gameObject) gameObject.x = dragX; gameObject.y = dragY; }); this.input.on('dragend', function (pointer, gameObject) { gameObject.clearTint(); }); Quote Link to comment Share on other sites More sharing options...
MagNus_Chrom Posted April 29, 2021 Share Posted April 29, 2021 I am having the same problem. If I use an earlier version of Phaser 3, it works just fine but when I try to use the most recent one (3.54.0) its doesn't. I am trying to use Spine in my project, if I use an earlier version, Spine doesn't work.... Did you get a work around? Quote Link to comment Share on other sites More sharing options...
elephant Posted May 19, 2021 Share Posted May 19, 2021 I also had such a problem, but somehow it was solved, I don't remember anymore)) if I remember I'll write Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.