Help with roller coaster track maths

Hey, dev forum,

Would someone please help me with this problem I have?

I’m making a roller coaster using bezier curves. The track is made by getting the next position on the curve after the length of the track model. Then it sets the position and orientation based on the previous position. However, as you can see, this has a lot of gaps between the models.

I believe my solution to this is to make the track completely by script. Problem is I have no clue how to. Could you please give me an example or tell me where to look for it so I can learn to do it on my own?

I would know how to place a brick that goes along the track all the way. But once you need them offset from the center you still get gaps.

Thanks in advance.

So I found out how to achieve this.

Basicly i calculate the points with offset around the point on a track, then i do this again. This gives me 4 points a1 a2, b1, b2.

connect a1 to b1, a2 to b2. make the b points the a points and go further to make 2 new b points at the new point on the curve and connect a to b again.

end result:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.