Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesnt work with Navigation Region #389

Open
hvlsavo opened this issue Aug 12, 2023 · 1 comment
Open

Doesnt work with Navigation Region #389

hvlsavo opened this issue Aug 12, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@hvlsavo
Copy link

hvlsavo commented Aug 12, 2023

Describe the bug
A clear and concise description of what the bug is.
While trying to use navigation region i get an error while trying to bake: NavigationMeshSourceGeometryData3D is empty. Parse source geometry first.
To Reproduce
Steps to reproduce the behavior:

  1. Use Hterrain
  2. Add Navigation Region node
  3. Try to bake navmesh
  4. See error: NavigationMeshSourceGeometryData3D is empty. Parse source geometry first.
    Linking a reproduction project may help.
    If you see any errors in the console, that may also help.

Expected behavior
A clear and concise description of what you expected to happen.
Get a working navigation region
Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • OS: [e.g. iOS] Windows 11 22621.1848
  • Graphics card (you can find out in Godot's console log) Vega 3
  • Godot version [e.g. 3.2.1] 4.1.1
  • Plugin version (or commit hash if you got it from Github directly) Latest
  • Renderer used: note that GLES2 is not supported. Forward+
@Zylann
Copy link
Owner

Zylann commented Aug 13, 2023

Mostly same issue as #335

Navigation is currently not supported out of the box in this plugin. For a very long time Godot didn't offer any way for navigation to detect anything that wasn't composed of straight MeshInstance3D and GridMaps, which were hardcoded in the engine.
I'm not sure why Godot manifests such an error, it seems not descriptive enough. But basically the terrain doesn't register to the navigation generation system. For it, terrain is like an empty Node3D. So I guess the error simply means the scene is "empty".

A workaround is to use the generate mesh menu option in the Terrain menu, because then Godot will find it and use it for navigation generation (then the mesh can be deleted afterward).

Since then, I think new APIs were finally added for the terrain to register into and provide geometry, but it still has to get implemented. Until then, the manual method has to be used (which is basically what the automatic method would end up doing), or you may implement the system and try a PR.

Even with this workaround however, it has been seen that the navigation system Godot uses is struggling very hard on large terrains, sometimes even giving up and crashing. That's why there is possibility of lowering the resolution of the mesh, but it might lead to artifacts. So this might still remain to be improved on both sides.

@Zylann Zylann added the enhancement New feature or request label Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants