BigMacintosh / Parking

Year 3 Games Project
MIT License
6 stars 0 forks source link

Join roads together to form a graph #238

Open RileyEv opened 4 years ago

RileyEv commented 4 years ago

Need to join the roads together, by finding a way to detect junctions.

One possible way to do this is:

  1. Get the bound areas by each road.
  2. Check if each of the bound areas overlap, if they do then this is a junction.
  3. For each junction find the centre on the overlapping area.
  4. Join the two roads with the two road points that are closest to the centre of overlapping area.

Some downsides with this method:

RileyEv commented 4 years ago

Gonna use a new method which will use each section of road made by the road tool.