Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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
0
Question by ADaurio · Aug 28, 2016 at 10:45 AM · navmeshpathfinding

Dealing With Multiple Navmeshes

Hey guys and gals! Long time reader, first time poster.

I'm working on an indie game at the moment and I've hit a bit of a stumbling block. Our game randomly generates maze-like environments out of large (square) set pieces. Each of these has a custom navmesh we've modeled ourselves. All of our pathfinding and navmesh code was made from scratch by myself, since we weren't sure Unity's built in navmeshes would work for our particular use-case.

My question is simple: how would you merge two navmeshes from a logical perspective? I can figure out the code, I'm just not sure how to logically go about it.

If I simply combine the list of vertices and triangles, I'm still going to have a separation in the middle with no triangles that run between the two set pieces. If I grab nearby verts on each navmesh and make new triangles between them, there's a chance that triangle will overlap an area that shouldn't be walked upon.

Thanks for taking the time to read this. Has anybody tackled something like this before? I need some ideas!

Comment
Add comment · Show 3
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 Cherno · Aug 28, 2016 at 05:51 PM 0
Share

Sounds like it's more of an issue with the way your pathfinding generated nodes from mesh triangles than from different meshes having no connection.

Also, be aware that $$anonymous$$esh.Combine$$anonymous$$eshes exists.

avatar image ADaurio · Aug 28, 2016 at 06:25 PM 0
Share

$$anonymous$$y pathfinding algorithm makes each vertex a node with a list of neighbours (any other vertices connected as part of a triangle). The issue is that there are no 'neighbours' between two meshes since no edges run between them.

The combine meshes function is very helpful though, thank you. Does it bridge two meshes, or just append the vert information?

avatar image Cherno ADaurio · Aug 29, 2016 at 10:27 PM 0
Share

It just combines, but doesn't create any new triangles.

The way you describe your solution sounds like it's largely incompaitlbe with runtime generated meshes, since those based on tiles or also usually consist of seperate quads with no connection, in order to be able to uv-map the same mesh and use it for the floor terrain.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How do you set up multiple navmesh agents to one target/destinations? 1 Answer

Horde of NavMeshAgents - stops to recalculate path. 4 Answers

How do I do AI pathfinding in a scene that changes drastically during play 0 Answers

Recentering an infinite world that has a NavMesh. 0 Answers

Use Fog of War to Restrict NavMesh Per-Agent 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