Search Unity

Simulating traffic with navmesh

Discussion in 'Navigation' started by Bogdan2601, Apr 10, 2020.

  1. Bogdan2601

    Bogdan2601

    Joined:
    Apr 10, 2020
    Posts:
    1
    Hi guys!
    For my students degree I would like to make a traffic simulation with NavMesh. I create a map using a grid system then , with some spawners and final destinations, I simulate some kind of traffic. The spawned object, a NavMesh agent, has its destination set. I would like things to get more organized (respecting lane, waiting in an intersection to give prioriry) and , the most important thing, use the whole map to get the lowest traveling time possible ( I wouldn't want all agents to crowd and get stuck on the shortest road).
    I would appreciate every suggestion or documentation. My ideas are to transform the map as an oriented graph , use some way points and find the best routes given the current traffic. But I am very confused right now and I would appreciate all help. In the picture you can see how a map would look like, with red being the spawners and green the destinations. In this example, things are pretty organized but it can get very messy.
     

    Attached Files: