Search Unity

Generate Off mesh links runtime

Discussion in 'Navigation' started by bedheadSWE, Aug 13, 2017.

  1. bedheadSWE

    bedheadSWE

    Joined:
    Aug 11, 2015
    Posts:
    1
    Hi! We are using the NavMeshBuilder to generate to mesh to our levels runtime, I'm extremely happy of the performance and the resulting navmesh, with the exception of there being no way to enabling the builder to generate Off Mesh Links like in the offline-baker.

    So my question is if any of you have any extra information on being able to generate off mesh links with the ruintime builder? When / if we can we expect off mesh links? Did I miss something?

    Thanks!

    /Hjalmar
     
  2. Ardinius

    Ardinius

    Joined:
    Oct 4, 2015
    Posts:
    57
    A good question, anyone have the answer for this?
     
  3. Euwlo

    Euwlo

    Joined:
    Sep 13, 2016
    Posts:
    2
    Yeah I'm also facing the same difficulty, trying to find a way to put it to work but have no idea how.
     
  4. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    I have some code from a project where I did this in a procedural game- what I had to do was find the edges of the navmeshes- instantiate the Links then connect the edges- that code is here-

    I wouldn't do that again I'd just make the agents jump from navmesh to navmesh like in this video(with linked package) here
     
  5. Radivarig

    Radivarig

    Joined:
    May 15, 2013
    Posts:
    121
  6. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Should work now
     
    orangetech, chin and Radivarig like this.
  7. orangetech

    orangetech

    Joined:
    Sep 30, 2017
    Posts:
    50
    That is two statge, but what happend on three or more statge?
     
  8. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Test it out- it will continue to jump to new target ledges- it doesn't matter how many there are. All it does is get the closest ledge to a target object and jumps there, its up to you to code the rest etc.
     
  9. orangetech

    orangetech

    Joined:
    Sep 30, 2017
    Posts:
    50
    I tested it jump start point to end, cross middle plane.
    but dont't worry,I found solution to generate navmeshlink runtime.
    https://github.com/orangeagain/unity-navgen/tree/example
     
    Last edited: Jun 28, 2021