Minimum number of control points in CatmulRomSpline libgdx

436 Views Asked by At

I am using the CatmullRomSpline class of libgdx for creating a smooth curve passing through three points. Basically I want to place coins between two platforms in a curved path. For that I followed the following algorithm reference image

  • Take the end top point of first platform as the first control point;

  • Take the middle point bw top end of first platform and top start of second platform , add a little height to it in y direction and take this point as second control point.

  • Take the top start point as second platform as third control point.

Now when I am trying to create a smooth path for my coin generation using these three control points, I just get one value what so ever t is use (CatmullRomSpline uses a float value t as parameter which has to vary bw 0 and 1).

Is there something I am missing . Is it that I need to provide more control points ?

0

There are 0 best solutions below