Pushing a curve into a path array results in error

Hello! So i am trying to create this extruded square essentially that follows the path of an arc then straight line to produce something that kind of looks like a nike swoosh, but boxier. The extruded object is segmented to allow for some morph meshing. The following is the code for creating the path array for the extrusion.

 var square = [new BABYLON.Vector3(-1, 1, -2),
              new BABYLON.Vector3(1, 1, -2),
              new BABYLON.Vector3(1, -1, 0),
              new BABYLON.Vector3(-1, -1, 0),
              new BABYLON.Vector3(-1, 1, -2)];

var pathLength = 6;
var pathSegments = 100;
var nbRects = 4;
var path = [ 

];

var bezCurve = BABYLON.Curve3.CreateQuadraticBezier(
    new BABYLON.Vector3(0, 0, -1),
    new BABYLON.Vector3(0, -1, 0),
    new BABYLON.Vector3(0, -1, -1),
    25);

//path.push(bezCurve);

for(var i=0; i<pathSegments; i++){
    path.push(new BABYLON.Vector3(0, 0, -pathLength / 2 + pathLength * (i / (pathSegments - 1))));
}

When I try and start the path array with a curve, I get an error stating e[n].clone is not a function.

Here is a link to what I have so far (with generous help from the forum here)

I can not seem to reproduce the issue:
image

Your playground does not throw any exceptions for me, is that intended ?

Yeah…apologies.[Here is the correct link!](https://playground.babylonjs.com/#VWISMC#5

It is because you are mixing curves and vector in the path. It should only be Vectors.

You can get the vectors from a curve as follow: var path = bezier2.getPoints();

so it would be: https://playground.babylonjs.com/#VWISMC#6

Ah…thanks so much. I figured that had to be the issue.