Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2022.2 beta is now available for testing. To find out what's new, have a look at our 2022.2 feature highlights.
    Dismiss Notice
  3. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
Dismiss Notice
Submit bug reports tagged with #Beta2022Win_Unity when you encounter unknown issues while testing the 2022.2 betas for a chance to win a year of Unity Pro. For more information, have a look at our Beta Sweepstakes Announcement.

Influence map

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

  1. laurentlavigne

    laurentlavigne

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

    DamonJager

    Joined:
    Jul 16, 2015
    Posts:
    53
    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:
    53
    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,649
    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