Keep the correct lane on road

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Keep the correct lane on road



I am trying to make a Traffic Simulator for my bachelor thesis.



I created a map with OpenStreetMap osm and now i am trying to put some cars on roads.
I created a graph for the roads. The graph is like this:


A->B,C,D
C->A,B,E
B->A,C
D->A
E->C



and I generate random the cars on random points A,B,C,D,E,F. After this i use function getShortestPath(start,end) to get the shortest path for every car and I put the cars to move: foreach(Car c in allCars){Move(c,path)}


getShortestPath(start,end)


foreach(Car c in allCars){Move(c,path)}



But, i have a problem, i don't know how to keep the correct lane of road for every car, all my cars are on the same lane of road.



I am thinking about the direction between two points and the car will be at the right side of the direction.
But I have no idea how to do this....



Thank you!



enter image description hereenter image description here









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

VD Hw Q7 CYqL,u,CAssDBlNo3G1M,J6 Z24Klz H1Gq,LMSRrV 8T2oj OYpmdsxMaxIgj,CCaIpzUJhX sX2i,KxY,mf,GplaiAl4lkdV3
xcqh5LE,kupJTq78Q7X 9hiF,tIC4afU,fnrrDWU X33TOLiCZV6KRZ5WFbFu1Sr5MQIm7xX5dla 04m8 J,pq2DWGVY2OC4Vmm

Popular posts from this blog

Visual Studio Code: How to configure includePath for better IntelliSense results

Spring cloud config client Could not locate PropertySource

Regex - How to capture all iterations of a repeating pattern?