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: 4 months 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 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T10:19:56.000Z (about 1 year ago)
- Last Synced: 2025-05-05T09:58:12.309Z (about 1 year 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: 319
- Watchers: 4
- Forks: 28
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- 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 navmesh
NavMesh 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.18 | 0.15 | 0.5 |
| 0.17 | 0.14 | 0.4 |
| 0.16 | 0.13 | 0.3 |
| 0.15 | 0.11.1 | 0.2 |
| 0.14 | 0.10 | 0.1 |
| 0.13 | 0.7 | x |