The current BezierCurve blends points for 0<=time<=1, shouldn't time=0 be the first control point and time=1 be the last? So shouldn't it blend only for 0<time<1.
So:
//first point
if (time < 0) {
BufferUtils.populateFromBuffer(point, getBatch(0).getVertexBuffer(), 0);
return point;
}
//last point.
if (time > 1) {
BufferUtils.populateFromBuffer(point, getBatch(0).getVertexBuffer(), getBatch(0).getVertexCount() - 1);
return point;
}
would be changed to:
//first point
if (time <= 0) {
BufferUtils.populateFromBuffer(point, getBatch(0).getVertexBuffer(), 0);
return point;
}
//last point.
if (time >= 1) {
BufferUtils.populateFromBuffer(point, getBatch(0).getVertexBuffer(), getBatch(0).getVertexCount() - 1);
return point;
}
I just started looking at how bezier curves work today so I could be totally wrong :D
Also, the problem here:
http://www.jmonkeyengine.com/jmeforum/index.php?topic=3495.0
...still exists when time=1, BezierCurve@116
munk /= (1 - time);