mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed close path looping.
This commit is contained in:
parent
903fbf1340
commit
4748b5bbea
@ -134,9 +134,10 @@ public class PathAttachment extends VertexAttachment {
|
||||
}
|
||||
position *= length;
|
||||
|
||||
if (closed)
|
||||
if (closed) {
|
||||
position = position % length;
|
||||
else if (position < 0 || position > length) {
|
||||
if (position < 0) position += length;
|
||||
} else if (position < 0 || position > length) {
|
||||
// Outside curve.
|
||||
if (position < 0) {
|
||||
x1 = worldVertices[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user