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 a3bea9e9e..06cde4795 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PathConstraint.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/PathConstraint.java @@ -112,10 +112,10 @@ public class PathConstraint implements Constraint { if (scale) lengths = this.lengths.setSize(boneCount); for (int i = 0, n = spacesCount - 1; i < n;) { Bone bone = (Bone)bones[i]; - float length = bone.data.length, x = length * bone.a, y = length * bone.c; - length = (float)Math.sqrt(x * x + y * y); + float setupLength = bone.data.length, x = setupLength * bone.a, y = setupLength * bone.c; + float length = (float)Math.sqrt(x * x + y * y); if (scale) lengths[i] = length; - spaces[++i] = lengthSpacing ? Math.max(0, length + spacing) : spacing; + spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength; } } else { for (int i = 1; i < spacesCount; i++)