mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 17:48:45 +08:00
[csharp] Fixed path constraint computations being invalid if a path's length is ever NaN. See #1230
This commit is contained in:
parent
e6acc6725b
commit
258215ec06
@ -191,7 +191,7 @@ namespace Spine {
|
||||
pathLength = lengths[curveCount];
|
||||
if (percentPosition) position *= pathLength;
|
||||
if (percentSpacing) {
|
||||
for (int i = 0; i < spacesCount; i++)
|
||||
for (int i = 1; i < spacesCount; i++)
|
||||
spacesItems[i] *= pathLength;
|
||||
}
|
||||
world = this.world.Resize(8).Items;
|
||||
@ -303,7 +303,7 @@ namespace Spine {
|
||||
position *= pathLength / path.lengths[curveCount - 1];
|
||||
|
||||
if (percentSpacing) {
|
||||
for (int i = 0; i < spacesCount; i++)
|
||||
for (int i = 1; i < spacesCount; i++)
|
||||
spacesItems[i] *= pathLength;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user