Search Unity

Does the navmesh system use a triangulation algorithm?

Discussion in 'Navigation' started by TheGabelle, Apr 18, 2019.

  1. TheGabelle

    TheGabelle

    Joined:
    Aug 23, 2013
    Posts:
    242
    If so, is it possible to use it outside the navigation system?
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
  3. TheGabelle

    TheGabelle

    Joined:
    Aug 23, 2013
    Posts:
    242
    Nice! Unfortunately I was hoping to use it outside of a NavMesh, and I'm pretty sure there's no way to inject a mesh as a navmesh either. I'll take a look at the SVG Importer package and see if it has a more generic triangulation utility.
     
  4. DwinTeimlon

    DwinTeimlon

    Joined:
    Feb 25, 2016
    Posts:
    300
    You are correct, there is currently no way to inject a mesh into the navmesh.
     
  5. TheGabelle

    TheGabelle

    Joined:
    Aug 23, 2013
    Posts:
    242
    Anyone know if the 'pathfinding' logic on a navmesh is exposed? Wondering if I could adapt it for my own mesh.
     
  6. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    Nope, that's blackboxed unfortunately.
     
  7. TheGabelle

    TheGabelle

    Joined:
    Aug 23, 2013
    Posts:
    242
    Dang it.
    I'll have to create / find a new solution. I'd like to have support multiple navmeshes (chunks, prefabs) that can easily work with each other, moving navmeshes, and runtime modifications.
     
  8. TheGabelle

    TheGabelle

    Joined:
    Aug 23, 2013
    Posts:
    242
    Spent the day playing with an excellent library called Poly2Tri is available on GitHub. It is also included in the ProBuilder package.