Hello, just having fun with this and tweens…
not sure it works the same timing but here is my bet (only create with no update) if it helps:
this.draggable1 = this.add.circle(250, 80, 8, 0xff6699);
this.followers = [];
for(var i = 0; i < 10; i++) {
this.followers.push(this.add.circle(this.draggable1.x, this.draggable1.y + (i+1) * 30, 8, 0xfabc99));
this.followers[i].i = i;
}
this.draggable1.setInteractive({ draggable: true })
.on('drag', function(pointer, dragX, dragY){
this.scene.tweens.add({
targets: this.scene.followers,
x: dragX,
delay: (t) => t * 100,
duration: 100,
ease: 'Linear'
});
this.scene.tweens.add({
targets: this.scene.followers,
y: (e) => dragY + (e.i + 1) * 30,
delay: (t) => t * 100,
duration: 100,
ease: 'Linear'
});
this.setPosition(dragX, dragY);
})