Fix physicsTranslate y opposite direction while dragging.

This commit is contained in:
Davide Tantillo 2025-01-09 10:15:14 +01:00
parent 3dd4e91ff5
commit f9d73920d2

View File

@ -1781,7 +1781,7 @@ class SpineWebComponentOverlay extends HTMLElement implements OverlayAttributes,
const skeleton = widget.skeleton!;
widget.dragX += this.screenToWorldLength(dragX);
widget.dragY -= this.screenToWorldLength(dragY);
skeleton.physicsTranslate(dragX, dragY);
skeleton.physicsTranslate(dragX, -dragY);
ev?.preventDefault();
ev?.stopPropagation();
});