#### mxar

• int
• Posts: 73
« on: February 01, 2017, 10:49:25 pm »
Hi.

The Alien Runner game uses a straight road which is based on Object3d planes.

In case  a developer needs to create a similar game with curved roads what the solution will be?

I'm trying to develop a method which creates a curved road.

The method will be something like this:

but the height is equal to zero and the tube is not round but is drawn arount to an angle < 360 degrees.

Any idea to help me?

Modify message

#### EgonOlsen

• Posts: 11899
« Reply #1 on: February 01, 2017, 11:06:54 pm »
The simplest idea that comes to my mind of to create a straight road out of x road parts and then rotate the vertices of all parts around the lower right (or left) vertex of the first part by some angle. Do that for all vertices of all parts that come after the part in question and then repeat the process with the next part. No idea of that would actually work, but it might.
It might be better to do that on your coordinates and create an object from the results instead of doing it on an actual object.

#### mxar

• int
• Posts: 73
« Reply #2 on: February 02, 2017, 09:42:10 am »

I'll check this solution.

How can I do the vertices rotation?

I had in mind to create a racing track defined as a list of segments: straights and left/right turns like in the attached image.

The straight part will be the Object3D plane and the left/right plane is the Object3D I try to create with the