How can I make a route on a minimap for my delivery system?

Hello, so I am wanting to make a system like Euro Truck Simulator 2 where you select the job then it shows you where to drive and then drop off the trailer. How can I do this? What do I need to look for and then learn to create? Is there any examples?

For the route calculation you would need to create a weighted graph with each intersection as an entry. You would probably also need speed and direction between specific points.

You could for instance use a Breadth-First Search algorythm to get the shorts path.

Once you get the needed points you could render the connectors out to a virtual texture and composite into your map texture.

1 Like