Jump to content

Help to create a curved path


Welisa Lewis
 Share

Recommended Posts

i need help with a game i'm creating. I need a platform which has a curved path and the player moves along the path created. I have created a path using Bezier Interpolation which creates a path using random points in a range. The issue is that i can only create the outline of the path and i need to fill the area under the curve so that it looks like a solid platform.  

Capture.PNG

Link to comment
Share on other sites

However, could you please help me with how to fill the entire area under the curve with a colour so that it looks solid. I am using a catmullRom interpolation this is the code below:

my array of this.points is:

this.points = {
        'x': [ 0, 128, 256, 384, 512, 608, 800, 1050, 1230, 1600, 1800 ,2000 , 2500 ],
        'y': [ 410, 350,500, 440, 360, 540 ,370 ,425, 400,  540,  470,  460, 415]
    };

code.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...