Jump to content

SidR

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. 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);
  2. 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 is 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); }
×
×
  • Create New...