mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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];
|
pathLength = lengths[curveCount];
|
||||||
if (percentPosition) position *= pathLength;
|
if (percentPosition) position *= pathLength;
|
||||||
if (percentSpacing) {
|
if (percentSpacing) {
|
||||||
for (int i = 0; i < spacesCount; i++)
|
for (int i = 1; i < spacesCount; i++)
|
||||||
spacesItems[i] *= pathLength;
|
spacesItems[i] *= pathLength;
|
||||||
}
|
}
|
||||||
world = this.world.Resize(8).Items;
|
world = this.world.Resize(8).Items;
|
||||||
@ -303,7 +303,7 @@ namespace Spine {
|
|||||||
position *= pathLength / path.lengths[curveCount - 1];
|
position *= pathLength / path.lengths[curveCount - 1];
|
||||||
|
|
||||||
if (percentSpacing) {
|
if (percentSpacing) {
|
||||||
for (int i = 0; i < spacesCount; i++)
|
for (int i = 1; i < spacesCount; i++)
|
||||||
spacesItems[i] *= pathLength;
|
spacesItems[i] *= pathLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user