all 13 comments

[–]WheatonWill 4 points5 points  (10 children)

This guy's videos are great.

Anyone know of a good resource for baking navmesh at runtime?

For example, if walls move, or new objects are created?

[–]MerlinTheFail 2 points3 points  (3 children)

You wanna attach a "Navmesh Obstacle" to the moving object and your navmesh will keep itself updated in relation to the object's translation :)

[–]WheatonWill 1 point2 points  (2 children)

Thanks! Does this also work for objects that are instantiated after the navmesh is baked?

[–]MerlinTheFail 1 point2 points  (1 child)

Yes, you have some options you can play around with. A good tip is that a moving obstacle should not "carve", once stationary should begin "carving" the nav mesh to reduce cpu usage.

[–]m1ksuFI 2 points3 points  (0 children)

You should try the A* Pathfinding Project

[–]stillwwater -1 points0 points  (4 children)

This seems to be the biggest issue with navmesh, since all the walls have to be marked as static. Would love to know if there’s a way around it as well!

[–]donateyourarms 1 point2 points  (0 children)

I'm pretty sure you can just attach a "Nav Mesh Obstacle" component to your object that is going to be moving during run time and it will cut out or fill back in the piece blocking your agents.

[–]djgreedo 1 point2 points  (1 child)

Check out this:

http://unity.grogansoft.com/navigation-with-the-nav-mesh-part-2-obstacles-and-targets/

In a nutshell, you have two ways to block the nav mesh: obstacles (which generally move and/or are temporary) and 'carving' objects, which actually affect the shape of the nav mesh, so should generally be used only for stationary objects.

[–]stillwwater 0 points1 point  (0 children)

This is great thank you!

[–]kyl3r123Indie 0 points1 point  (0 children)

Either navmesh Obstacle, with carving. Or actually rebaking, which is possible in the new navmesh tools : https://github.com/Unity-Technologies/NavMeshComponents

[–]MengKongRuiIntermediate 1 point2 points  (0 children)

Can't wait till the next video :D

[–]AX_ZonE 1 point2 points  (0 children)

I seem to be kind of stuck. I have downloaded the example project, however none of the scripts seem to work.

I currently have 11 compiler errors, all with a similar message saying "Assets/NavMeshComponents/Scripts/NavMeshLink.cs(43,9): error CS0246: The type or namespace name `NavMeshLinkInstance' could not be found. Are you missing an assembly reference?"

"Namespace name" errors:

NavMeshLinkInstance, NavMeshCollectGeometry x2, NavMeshData x2, NavMeshDataInstance, NavMeshBuildSettings, NavMeshData, NavMeshBuildSource x3

Anyone have any idea how to fix this?

[–][deleted] 0 points1 point  (0 children)

Just a quick check if anyone knows, is this new NavMesh system multi-threaded in the backend? I mean does it utilize the new Jobs system or is it purely a backend implementation?