From f9d73920d2626acc8558b339ced4f37eedbca800 Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Thu, 9 Jan 2025 10:15:14 +0100 Subject: [PATCH] Fix physicsTranslate y opposite direction while dragging. --- spine-ts/spine-webgl/src/SpineWebComponentWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts b/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts index 8b3c8d14b..2e2f94755 100644 --- a/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts +++ b/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts @@ -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(); });