From 4748b5bbea22eb1c50a42af91602e0f40c0d5419 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Thu, 26 May 2016 13:36:50 +0200 Subject: [PATCH] Fixed close path looping. --- .../esotericsoftware/spine/attachments/PathAttachment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PathAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PathAttachment.java index abc3c6741..c50f5f7d3 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PathAttachment.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PathAttachment.java @@ -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];