- Home /
Navmesh dynamic creation and linking?
I'm exploring some options for path finding, and i was hoping to be able to use the navmesh system in unity. When I have a pre-defined navmesh, my setup works fine (Single paths with links at transition points to move onto the next path/navmesh).
However, I need to have parts of the paths generated in game (eg, the player lays down a crate in water which allows the path to be updated--or the player lays a piece of track down to connect 2 parts of a disconnected train track). The parts that are 'touching' should be one continuous navmesh, where the crate in the water should utilize offmesh links...
From what I've seen, if this is possible to generate in-game, it will require re-baking, which is severely inconvenient while in-game.
Is there anything i'm overlooking, or any tricks to aid in dynamic navmesh'ing?
Thanks for any pointers!
Answer by DanSuperGP · Jan 08, 2015 at 11:14 PM
When using Navmesh, everything must be created at design time. You can use Navmesh obstacles to block an existing path, and then remove them once the player has done what they need to do. You can create offmeshlinks in advance and disable them until the user places the crate in the correct place. (requires pro)
This isn't very dynamic.If you need the player to be able to place objects anywhere in the water and have the navmesh respond correctly, or have the player build track in a dynamic way other than specific prebuilt paths, I'm afraid you will have to find another solution than the built in navmesh.
Your answer
Follow this Question
Related Questions
Building a NavMesh at Runtime 1 Answer
What is the difference between NavMesh and PathFinding? 0 Answers
A* Pathfinding issue with directly adjacent nodes. 1 Answer
Unity Meshes for C# generated objects 0 Answers
Load font at runtime 0 Answers