NathanSweet 2016-11-29 13:23:50 +01:00
parent a24fea41c0
commit 8e0972d732

View File

@ -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++)