Adding Custom Blender NavigationRegion3D to main Nav Mesh?

Godot Version

4.2

Question

Imgur

I have created a custom navigation mesh for my object in Blender. That lays ontop of the object and over the sides so that NavigationAgent3D’s can walk off of the platform.

I can’t for the life of me figure out how to add it to the ground navigation mesh.

Using Nav Mesh Docs seem to example how to consume geometry and bake into the navigation mesh. I don’t think that is what I am trying to do?

I tried running: NavigationRegion3D.bake_navigation_mesh() but it just removes the Navigation Region I created in blender as adds a little square on top of the Platform.

If I am completely misunderstanding the problem, all I want is to spawn NavigationAgent3D’s ontop of my created-at-run-time platform and have them able to walk off the platform and traverse the main navigation mesh.

Thanks in advance for any help!

1 Like

You can not stack another navigation mesh on an existing navigation mesh as navigation meshes can not overlap or intersect.

You need to create a new procedural mesh with everything inside removed, there can be no overlap like seen in this image. All the navigation mesh surface below your custom mesh needs to go.

If the baking removes your little platform that is a matter of finding the right agent bake parameters for step height and slope as well as cell size. If the platform is too small to matter for an optimized navigation mesh it will be discarded regardless.

1 Like

Okay I spawn the platform inside the already created NavRegion3D in the tree and call rebake. I have already removed the navigation mesh I created in blender.
Which fixes the navigation mesh based on what you said. But I am still lost on what needs to change for the Navigation to be able to walk off the platform.

I tried increasing the Navigation Max Climb which then created navigation mesh over the top of the platform. But then the NavAgents get stuck and can’t navigate around the platform because they can’t and shouldn’t be able to walk up onto it.

I also tried upping the Max Slope to 90 degrees and it also didn’t change anything.

Imgur
The Nav Region creates a nav mesh on top of the platform, clearly it doesn’t fit the entire top of the platform, not sure if that is a problem?

Imgur

They can navigate around the platform but can’t get off.

This youtube video (1:30 time) uses links, is that required here?

For the baking if the agent parameters do not allow the agent to move up that slope because it is too steep that is part of its attributes. There is no “maybe only sometimes it is to steep”. So either change the agent atrributes or dont make the platform slope as steep. The other option is to not bake it and stitch your navmesh procedual with your platform navmesh.

If you dont want to change any of that you can use navigation links to connect the otherwise disconnected navmesh islands but you will need to manage how the agents can move over those surface gaps in your own script code. The links only add a connection for the pathfinding, how the agents gets between those two points of a link needs to be solved in scripts.

1 Like

Thanks, smix8! You have been incredibly helpful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.