# How can I create a curved line made from smaller actives ?

• 5th January 2018, 04:00 PM
TGeorgeMihai
How can I create a curved line made from smaller actives ?
How can I create a curved line made from smaller actives ?

I want to make something like the following, from one point (x1,y1) to another point (x2,y2)

http://www.appbite.com/wp-content/up...ame-review.jpg
• 5th January 2018, 04:42 PM
Decal
Are you using the physics object?
If so you can use the "Physics - Ground" object to plot a lot of dots to to make the curve.
• 5th January 2018, 07:45 PM
TGeorgeMihai
Thank you, but it doesn't really help me.

I know how to make a straight line (from here and here ), but I don't know the formula for a curved one.
• 6th January 2018, 01:44 AM
mobichan
You should read up on Bézier curves here: http://www.create-games.com/article.asp?id=1866

I would suggest stringing 3 point Bézier curves end to end in order to draw your curve lines (and to make the path your coaster will follow).
• 16th January 2018, 09:35 AM
TGeorgeMihai
I still can't figure it :(
• 16th January 2018, 10:36 AM
mobichan
Can you say what is confusing you? Bézier curves are something you need to play with for a bit before you grasp the concept.

As for your image in the OP, that looks more like a polygon mesh with a texture. You are probably not going to get as smooth of a curve with individual sprites strung together. Most old game made unique art for the angles used in a curve and then placed them by hand.

Are you needing this for a roller coaster game?
• 25th January 2018, 09:45 AM
TGeorgeMihai
Sorry for my late reply. I want something like this:
https://image.ibb.co/cVOqZG/curve.png
green - start point
blue - end point
yellow - curve made from smaller actives

I've also found these formulas, but I don't know if they are good for what I want: https://en.wikipedia.org/wiki/Curve_fitting
• 25th January 2018, 11:13 AM
mobichan
Here is an old example of a 3 point bezier curve. It is based on the article in the link I mentioned above. I actually use this to visualize 3 point curves, since the curve does not pass through the midpoint.

Attachment 24497

I am drawing a blank right now on what the formula is to set the angle to follow the curve. Perhaps someone else could chime in with the answer? :)
• 26th January 2018, 10:16 AM
TGeorgeMihai
This should do the trick

Thank you very much ;)