Fixes, tree WIP

This commit is contained in:
paulevsGitch 2020-12-27 14:03:11 +03:00
parent f18cf5c073
commit 58124139d5
7 changed files with 90 additions and 17 deletions

View file

@ -253,6 +253,10 @@ public class SplineHelper {
public static Vector3f getPos(List<Vector3f> spline, float index) {
int i = (int) index;
int last = spline.size() - 1;
if (i >= last) {
return spline.get(last);
}
float delta = index - i;
Vector3f p1 = spline.get(i);
Vector3f p2 = spline.get(i + 1);