Fixed close path looping.

This commit is contained in:
NathanSweet 2016-05-26 13:36:50 +02:00
parent 903fbf1340
commit 4748b5bbea

View File

@ -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];