We have a sprite which we set as interactive
this.testSprite = this.add.sprite(100, 100, 'button')
.setInteractive();
Now we make this object draggable by adding
this.input.dragDistanceThreshold = 20;
this.input.setDraggable(this.testSprite);
this.input.on('drag', function (pointer, obj, dragX, dragY) {
obj.x = dragX;
obj.y = dragY;
});
Now if we want to increase the size of the draggable area (be able to click a little further to still drag the object), I tried giving the .setInteractive() function the additional parameter for the new bounds new Phaser.Geom.Rectangle(0, 0, 1000, 1000) such as:
this.testSprite = this.add.sprite(100, 100, 'button')
.setInteractive(new Phaser.Geom.Rectangle(0, 0, 1000, 1000));
It doesn't seem to affect this draggable property. Is this the proper way to do it or is there a separate drag size property that I can't find?