Search Unity

Cost-bounded sub-navmesh

Discussion in 'Navigation' started by jfclavette, Aug 26, 2019.

  1. jfclavette

    jfclavette

    Joined:
    Jul 3, 2019
    Posts:
    1
    Hi!

    I'm currently working on a tactics-style game and I would like not to use a grid, but, rather, navmesh and actual distance/cost as a metric for how far a unit can move. I'd also want to display that range through some terrain overlay.

    Re-stating the problem, I want to cut a sub-navmesh from the general navmesh whose mesh is actually the parts of the navmesh within a given cost from the agent.

    Looking at the NavMesh API, it seems pretty bare-bones and doesn't really let me anything like that at all. I'm thinking of still leveraging navmesh generation but then just grabbing the mesh through CalculateTriangulation.

    Performance isn't a major concern since I'll be doing one of those queries every few seconds or so.

    I guess my question is two-fold

    1) Is anyone aware of a full navmesh solution that would get me closer to that?
    2) Failing that, can anyone recommend some maintained C# library for something like a half-edge structure/anything more pleasant to work with that the vertices/indices/triangles meshes Unity gives you back through CalculateTriangulation?
    3) General tips/advice/algorithms to how to go about this? I have a feeling I'm not the first one to try to solve that problem.
     
    Last edited: Aug 26, 2019