From 16eb6b5ede270e068d914f702f8a229212779aee Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Mon, 7 Nov 2016 13:31:30 +0100 Subject: [PATCH] Prefer thinking about offset rotation as positive. --- .../src/com/esotericsoftware/spine/PathConstraint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PathConstraint.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PathConstraint.java index 1ea06471b..08e83a4b6 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PathConstraint.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PathConstraint.java @@ -131,7 +131,7 @@ public class PathConstraint implements Constraint { else { tip = false; Bone p = target.bone; - offsetRotation *= p.a * p.d - p.b * p.c > 0 ? -degRad : degRad; + offsetRotation *= p.a * p.d - p.b * p.c > 0 ? degRad : -degRad; } for (int i = 0, p = 3; i < boneCount; i++, p += 3) { Bone bone = (Bone)bones[i]; @@ -164,7 +164,7 @@ public class PathConstraint implements Constraint { boneX += (length * (cos * a - sin * c) - dx) * rotateMix; boneY += (length * (sin * a + cos * c) - dy) * rotateMix; } else - r -= offsetRotation; + r += offsetRotation; if (r > PI) r -= PI2; else if (r < -PI) //