LeanTween: strange sequence of bezier control points

I believe there is something strange when passing a Vector3 to the move tween. A square (P1, C1, C2, P2) – P1 lower left, then clockwise – should give something approx to a half circle or a half sine curve. Instead, you get a twisted loop. However if you exchange the control handles (P1, C2, C1, P2), you get exactly that expected clean curve. Could there be some bug still in the LeanTween bezier piece?

So this one makes the strange loop:

Vector3[] path = new Vector3 [] {new Vector3(0,0,0), new Vector3(0,30,0), new Vector3(40,30,0), new Vector3(40,0,0)};
LeanTween.move( test.gameObject, path, 5.0f, new Hashtable());

While the following one works as expected and makes the object move along kind of a ballistic curve (as intended and expected from a bezier with the two control vectors pointing straight up):

Vector3[] path = new Vector3 [] {new Vector3(0,0,0), new Vector3(40,30,0), new Vector3(0,30,0), new Vector3(40,0,0)};
LeanTween.move( test.gameObject, path, 5.0f, new Hashtable());

Regards, habitoti

Hi Habitoti,
You are correct the order of the control points is totally flipped from what you would expect. I have tried to make this clear in the documentation, but let me know if I can call attention to it better: LeanTween - LeanTween

I would love to correct this annoying detail, but unfortunately I cannot do so without messing up everyone’s current projects that use it the old way…