godotengine / godotengine/godot-docs
There is no example about NavigationServer with obstacle creation
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**Your Godot version:**
4.3
**Issue description:**
This isn't enough to create an obstacle for a navigation path, so how to do it?
```Py
var _obstacle_rid:RID = NavigationServer2D.obstacle_create()
NavigationServer2D.obstacle_set_map(_obstacle_rid, _map_rid)
NavigationServer2D.obstacle_set_avoidance_layers(_obstacle_rid, obstacle_layer)
NavigationServer2D.obstacle_set_vertices(_obstacle_rid, _vertices)
NavigationServer2D.obstacle_set_position(_obstacle_rid, _obstacle_position)
NavigationServer2D.obstacle_set_avoidance_enabled(_obstacle_rid, true)
NavigationServer2D.obstacle_set_paused(_obstacle_rid, false)
NavigationServer2D.map_force_update(_map_rid)
```
There's no option to manually do something, because there is a missing getter `NavigationServer2D.region_get_navigation_polygon()`
**URL to the documentation page:**
https://docs.godotengine.org/en/4.3/tutorials/navigation/navigation_using_navigationservers.html
If you know how to fix the issue you are reporting please
consider opening a pull request. We provide a tutorial on
using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html,
writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.