mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 17:48:45 +08:00
[lua] Fix path constraint for when path length is NaN. See #1230.
This commit is contained in:
parent
9f8003a3b6
commit
7d066d7f9d
@ -252,7 +252,7 @@ function PathConstraint:computeWorldPositions (path, spacesCount, tangents, perc
|
||||
local pathLength = lengths[curveCount + 1];
|
||||
if percentPosition then position = position * pathLength end
|
||||
if percentSpacing then
|
||||
i = 0
|
||||
i = 1
|
||||
while i < spacesCount do
|
||||
spaces[i + 1] = spaces[i + 1] * pathLength
|
||||
i = i + 1
|
||||
@ -395,7 +395,7 @@ function PathConstraint:computeWorldPositions (path, spacesCount, tangents, perc
|
||||
position = position * pathLength / path.lengths[curveCount];
|
||||
end
|
||||
if percentSpacing then
|
||||
i = 0
|
||||
i = 1
|
||||
while i < spacesCount do
|
||||
spaces[i + 1] = spaces[i + 1] * pathLength
|
||||
i = i + 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user