setDraggable not working

You pass the rectangle in the config object as well.

Should be:

gameObject.setInteractive({ draggable: true, hitArea: rectangleObject});
1 Like