Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity for Transit Sim - NavMesh or other solution?

Discussion in 'Navigation' started by dselected, May 13, 2018.

  1. dselected

    dselected

    Joined:
    Oct 10, 2015
    Posts:
    1
    I'm fairly new to Unity and have the following goal:

    Create an academic simulation of people:
    • entering a train station
    • queueing for trains
    • trains arriving
    • people boarding and deboarding
    • trains departing
    I would like to implement this as a parametric simulation to study throughput in transit stations, not as a game or one-off animation. Our study will involve changing the number of people, throughput, trains, train breakdowns, etc.

    I've done a few tutorials with NavMesh and wonder if it can handle the complexity of this scenario. If not, what else should I be looking at? State machines with path animation? Any help much appreciated!
     
  2. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    Around chokepoints, humans (and other animals) tend to act almost like a compressible fluid. We'll naturally speed up through a chokepoint, then spread out into our own personal space. You could probably use the navmesh for a basic pathfinding algorithm, but you'll have to do some context-aware intelligence on top of that. A good test for you would be to put an increasing number of people in a small box and make sure that they spread out more-or-less evenly. Think about real humans getting into an elevator. One person will stand in the middle, two people will stand side by side, three people will make a sort of triangle and four people will retreat to their corners.