https://github.com/vleue/vleue_navigator
Pathfinding on NavMeshes for Bevy
https://github.com/vleue/vleue_navigator
any-angle bevy bevy-plugin navmesh path-planning pathfinding rust
Last synced: 6 days ago
JSON representation
Pathfinding on NavMeshes for Bevy
- Host: GitHub
- URL: https://github.com/vleue/vleue_navigator
- Owner: vleue
- License: apache-2.0
- Created: 2021-03-22T20:46:31.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-28T00:47:11.000Z (23 days ago)
- Last Synced: 2025-04-07T00:07:58.205Z (13 days ago)
- Topics: any-angle, bevy, bevy-plugin, navmesh, path-planning, pathfinding, rust
- Language: Rust
- Homepage: https://vleue.github.io/vleue_navigator/
- Size: 2.49 MB
- Stars: 304
- Watchers: 3
- Forks: 22
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-bevy - `vleue_navigator`
- awesome-bevy - `vleue_navigator`
README
# Navigation for Bevy with NavMesh

[](https://docs.rs/vleue_navigator)
[](https://crates.io/crates/vleue_navigator)Navigation mesh for [Bevy](http://github.com/bevyengine/bevy) using [Polyanya](https://github.com/vleue/polyanya).

Check out the [WASM demos](https://vleue.github.io/vleue_navigator/)
## Usage
### From a prebuilt NavMesh
Loading a mesh from a gLTF file, then building a `NavMesh` from it and using it for getting paths. See [gltf.rs](https://github.com/vleue/vleue_navigator/blob/main/examples/gltf.rs) and [`NavMesh::from_bevy_mesh`](https://docs.rs/vleue_navigator/latest/vleue_navigator/struct.NavMesh.html#method.from_bevy_mesh).
### From obstacle components
Spawn entities marked as obstacles, create the NavMesh live from them. See [auto_navmesh_aabb](https://github.com/vleue/vleue_navigator/blob/main/examples/auto_navmesh_aabb.rs) and [`NavMeshUpdaterPlugin`](https://docs.rs/vleue_navigator/latest/vleue_navigator/prelude/struct.NavmeshUpdaterPlugin.html).
## Example videos
[Pathfinding many agents](https://www.youtube.com/watch?v=Zi9EMAdHp4M).
[Parameters for NavMesh generation](https://www.youtube.com/watch?v=wYRrvWaLjJ8)
## Reading list
Pathfinding:
* [Compromise-free Pathfinding on a Navigation Mesh](https://www.ijcai.org/proceedings/2017/0070.pdf): Fast and optimal path finding on a generalized navmeshNavMesh building:
* [Line Generalisation by Repeated Elimination of Points](https://hull-repository.worktribe.com/preview/376364/000870493786962263.pdf): Geometry simplification while keeping the general shape
* [Constrained Delaunay Triangulation](https://en.wikipedia.org/wiki/Constrained_Delaunay_triangulation): Building a tri-mesh from edges
* [Polygon Offsetting by Computing Winding Numbers](https://mcmains.me.berkeley.edu/pubs/DAC05OffsetPolygon.pdf): Agent radius### To Implement
* Steering Behaviors For Autonomous Characters https://www.red3d.com/cwr/steer/
## Bevy Supported Versions
|Bevy|vleue_navigator|avian|
|---|---|---|
|0.15|0.11.1|0.2|
|0.14|0.10|0.1|
|0.13|0.7|x|