Skip to content

Proposal: Runtime NavigationMesh baker for HTerrain #508

Description

@GetUpSii

Hi Zylann,I really like your plugin design.

Since HTerrain does not directly provide navigation baking, I created a small helper script:

HTerrainNavBaker.gd

hterrain_nav_baker.txt

It does:

  • Generate a mesh from HTerrain heightmap
  • Create temporary StaticBody3D collision geometry
  • Bake NavigationMesh through NavigationRegion3D
  • Remove temporary nodes after baking

It works with Godot 4.7.

I found that for HTerrain generated navigation, a small cell_height value works better:

nav_mesh.cell_height = 0.01

Otherwise NavigationAgent3D may return path points with height.

Would this be useful as an optional utility in HTerrain?
I can submit a Pull Request if you think it fits the project.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions