mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 17:48:45 +08:00
[libgdx] Fixed path constraint computations being invalid if a path's length is ever NaN.
This commit is contained in:
parent
91a1dc4ece
commit
e6acc6725b
@ -208,7 +208,7 @@ public class PathConstraint implements Constraint {
|
||||
float pathLength = lengths[curveCount];
|
||||
if (percentPosition) position *= pathLength;
|
||||
if (percentSpacing) {
|
||||
for (int i = 0; i < spacesCount; i++)
|
||||
for (int i = 1; i < spacesCount; i++)
|
||||
spaces[i] *= pathLength;
|
||||
}
|
||||
world = this.world.setSize(8);
|
||||
@ -319,7 +319,7 @@ public class PathConstraint implements Constraint {
|
||||
else
|
||||
position *= pathLength / path.getLengths()[curveCount - 1];
|
||||
if (percentSpacing) {
|
||||
for (int i = 0; i < spacesCount; i++)
|
||||
for (int i = 1; i < spacesCount; i++)
|
||||
spaces[i] *= pathLength;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user