From 731aa2bdf1b7a5de0290db51b3d66fb3075ce7ec Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Wed, 4 Feb 2026 16:41:11 +0100 Subject: [PATCH] Fix on drag handle action. --- spine-ts/spine-construct3/src/c3runtime/instance.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spine-ts/spine-construct3/src/c3runtime/instance.ts b/spine-ts/spine-construct3/src/c3runtime/instance.ts index 00038048a..4677cf6ac 100644 --- a/spine-ts/spine-construct3/src/c3runtime/instance.ts +++ b/spine-ts/spine-construct3/src/c3runtime/instance.ts @@ -324,15 +324,14 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase { pose.y = -y * spine.Skeleton.yDir; } } else if (!this.prevLeftClickDown) { - const applied = bone.applied; - const { x, y } = matrix.gameToSkeleton(touchX, touchY); + const { x: boneGameX, y: boneGameY } = matrix.boneToGame(bone); const inside = handleObject.slot - ? this.isInsideSlot(x, y, handleObject.slot, true) - : this.inRadius(x, y, applied.worldX, applied.worldY, handleObject.radius); + ? this.isInsideSlot(touchX, touchY, handleObject.slot) + : this.inRadius(touchX, touchY, boneGameX, boneGameY, handleObject.radius); if (inside) { handleObject.dragging = true; - handleObject.offsetX = x - applied.worldX; - handleObject.offsetY = y - applied.worldY; + handleObject.offsetX = touchX - boneGameX; + handleObject.offsetY = touchY - boneGameY; } } }