Fixes, tree WIP
This commit is contained in:
parent
f18cf5c073
commit
58124139d5
7 changed files with 90 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue