How do I create a curve using cubic spline interpolation?

0 favourites
  • 3 posts
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • There's a very simple way to do cubic interpolation in Construct 3:

    However, I need the curve to pass throught every node. There is a third-party behavior "Spline Movement". Using it I make the curve like I need.

    Question is How I can make the curve using spline interpolation in one tick (using loop's and without third-party behaviour)?

  • Cubic() basically gives a cubic bezier spline where the two middle values are just control points. To have the control points land on the curve you could use Catmull-rom splines. You can find the formula for that online.

    Alternately you could expand cubic out to its actual formula and calculate what values to use for the second and third parameters so the curve lands on the control points.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Cubic() basically gives a cubic bezier spline where the two middle values are just control points. To have the control points land on the curve you could use Catmull-rom splines. You can find the formula for that online.

    Alternately you could expand cubic out to its actual formula and calculate what values to use for the second and third parameters so the curve lands on the control points.

    Thank you for your advice! Finally I create level generator with spline curve:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)