|
@@ -4824,11 +4824,13 @@
|
|
|
var step = 1.0 / nbPoints;
|
|
|
for (var i = 0; i < totalPoints.length - 3; i++) {
|
|
|
var amount = 0.0;
|
|
|
- for (var c = 0; c <= nbPoints; c++) {
|
|
|
+ for (var c = 0; c < nbPoints; c++) {
|
|
|
catmullRom.push( Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount) );
|
|
|
amount += step
|
|
|
}
|
|
|
}
|
|
|
+ i--;
|
|
|
+ catmullRom.push( Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount) );
|
|
|
return new Curve3(catmullRom);
|
|
|
}
|
|
|
|