Search Unity

  1. The 2021.2 beta is now available. To find out what's new, have a look at our 2021.2 beta blog post.
    Dismiss Notice
  2. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  3. Dismiss Notice

Influence map

Discussion in 'AI & Navigation Previews' started by laurentlavigne, Dec 13, 2016.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,102
  2. DamonJager

    DamonJager

    Joined:
    Jul 16, 2015
    Posts:
    47
    I've yet to get my mind around the 5.6 beta, but you can't do it in 5.5.

    It's possible to access the geometry through the navmesh class, but you would need to build your own navmeshagent and navmesh. It would be a nice feature to have weights per-vertices/nodes instead of perlayer. I can imagine that it would be easy to expose that. <- Feature Request There
     
    Last edited: Dec 13, 2016
    laurentlavigne likes this.
  3. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    Are there any tutorials on how to access navmesh data to generate a map for ai use?
     
  4. DamonJager

    DamonJager

    Joined:
    Jul 16, 2015
    Posts:
    47
    It's really a niche thing, so no, there're no tutorials. I used the documentation and intellisense: UnityEngine.AI.
     
    laurentlavigne likes this.
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,102
    Like Damon says, and from what I'm seeing, AI in general is niche.
    Someone already did what you're looking for and you can glean some info from reading his twitter https://twitter.com/OskSta. He uses the vertices of a nav mesh to build a vector flow which is the end step of an influence map where you propagate the target. navmesh.NavmeshTriangulation() gives you everything you need. It's not as easy as arrays because you don't have the implicit connectedness of a grid but with "indices" you get your connection back at low cost, it's just that you need to do some preprocessing to get array of the distances between those indices and use the reverse as weight to influence the propagation.
    I'd totally share my stuff but at the moment I'm still busy with grids.
     
    Mycroft likes this.
unityunity