• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Kurt_A_Astro · Apr 28, 2020 at 04:09 PM · navmeshnavmeshagentpathfinding

Use Fog of War to Restrict NavMesh Per-Agent

In a sim I'm working on, I have a grid representation of everything in WorldMap, a class where every cell is populated with information about its space in the game world. Each NPC Agent (there can be up to 30) has their own MindMap : WorldMap where all cells are initially blank but fill out as the Agent explores. Each Agent is attached to their own personal NavMeshSurface Components - Reason being, I want to constrain their NavMesh pathfinding to occur only in the area they've "discovered" so far, re-baking during runtime. Discovery happens both through movement and field of view.

If it was just one Agent, constraining the area would be as easy as toggling Areas explored/unexplored, walkable/not-walkable but these areas will differ for each Agent. I need help weighing potential solutions.


  1. NavMeshSurface's Collect Objects -> Volume is almost what i need, but it's, annoyingly, restricted to a rectangle.


  2. I could potentially clone the world plane's collider mesh for each Agent and use these as Not Walkable NavMeshModifiers, cutting away at them as the Agent moves during runtime (already giving me a headache)


  3. Use the Agents' MindMap grids (blank values) to define a bunch of Not Walkable NavMeshVolumes, but i'll need to partition the grid into largest possible fitting rectangles so i'm not spawning in 5000+ 1-Square-Unit volumes, doing this often for each Agent.


I don't know if NavMesh Components give me any more options I'm not thinking of, any help at all before i dive in too deep would be appreciated.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Appleguysnake · Dec 22, 2021 at 04:59 PM 0
Share

I've got almost the exact same question, were you able to find a solution or did you go with something custom?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

135 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Way to ignore specific navmeshobstacles for specific navmeshagent when creating path? 0 Answers

How to sample a point on a navMesh Agent path 0 Answers

Is it possible to assign a custom path to a NavMeshAgent? 0 Answers

navmesh.sampleposition works strangely, what is going on here? 0 Answers

Baking NavMesh at Runtime: Connecting separate NavMeshSurfaces 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges