Updating Navmesh with changes to the Gridmap?

EvanEvan Posts: 2Member
in 3D

Hello, I am making a game similar to Dungeon Keeper but I am having trouble with navigation and navmesh

I have been using Gridmaps to generate my levels and right now they are just a series of cubes for walls and planes for corridors. Since I am generating the levels I am unable to bake the NavMesh.

I've tried moving the Gridmap under the Navmesh and Navigation nodes and adding a navmesh to the planes in the MeshLibrary.
That seemed to work for a sample project I found but I have had no luck in replicating the success though I may be missing something.

Another problem occurs when I change any of the cell items. I get a spam of errors of "E 0:00:19.495 _navmesh_unlink: Condition "!nm.linked" is true."

All in all I don't really know what I'm doing when it comes to Navigation and Navmesh. If anyone can give me an idea or a suggestion of what to try I would really appreciate it.

Best Answer

  • SalamiSamSalamiSam Posts: 19
    Accepted Answer

    A little late but, I'm only guessing but I think the error is because you removed a navmesh after baking without calling navmesh_remove() in the parent navigation node. Though, as of 3.2.1 release, baked navigation meshes can't be altered at runtime.

    One thing to try is using astar, and adding the navigable cells to it. This might be extra work if movement isn't tile based but then it can be dynamically changed at runtime.

Answers

  • SalamiSamSalamiSam Posts: 19Member
    Accepted Answer

    A little late but, I'm only guessing but I think the error is because you removed a navmesh after baking without calling navmesh_remove() in the parent navigation node. Though, as of 3.2.1 release, baked navigation meshes can't be altered at runtime.

    One thing to try is using astar, and adding the navigable cells to it. This might be extra work if movement isn't tile based but then it can be dynamically changed at runtime.

  • EvanEvan Posts: 2Member

    @SalamiSam said:
    A little late but, I'm only guessing but I think the error is because you removed a navmesh after baking without calling navmesh_remove() in the parent navigation node. Though, as of 3.2.1 release, baked navigation meshes can't be altered at runtime.

    One thing to try is using astar, and adding the navigable cells to it. This might be extra work if movement isn't tile based but then it can be dynamically changed at runtime.

    Thanks for the answer.

    I switched to astar navigation. It is working well enough for me now so far.

  • SalamiSamSalamiSam Posts: 19Member

    Cool. I'm interested in how your project turns out. I'm dealing with similar situations in my own WIP.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file