Search Unity

Navmesh usable for multiple radius custom agents

Discussion in 'Navigation' started by hippocoder, Apr 26, 2015.

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi,

    Having real problems seeing where I can define multiple navmeshes with a different radius. For example I have vehicles, small characters and large characters, so I need 3 navmeshes per scene I suppose?

    I use NavMesh.CalculatePath to generate the path because I prefer to move agents myself (they're all physics based and need that interaction at all times).

    But apparently there is only one navmesh baked into the scene? I must be stupid because I doubt Unity would be this short sighted, so any advice is welcome, thanks!
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I fear you are not stupid.
     
  3. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    The ability to only bake one mesh is a design flaw.

    Currently the approach to filter different sized agents would be to use the navigation layer / area / whatever they're calling it in 5 - system for segmenting where masked agents can navigate.

    While internally handled as such, it is not as powerful a pattern as straight up allowing multiple navmesh bakes in a scene. This should be on the way, but that obviously doesn't change things now. Layers should handle your present scenario though.
     
    hippocoder and Dantus like this.
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Thanks guys, much appreciated. I'll be patient and wait for Unity in this case. Game is still a fair few months off.