| Crates.io | bevy_pathfinding |
| lib.rs | bevy_pathfinding |
| version | 0.1.0 |
| created_at | 2025-05-17 22:13:27.781059+00 |
| updated_at | 2025-05-17 22:13:27.781059+00 |
| description | A simple 3D Bevy plugin that combines flowfield pathfinding with boid-based collision avoidance to move units smoothly. Great for RTS games! |
| homepage | https://github.com/The-DevBlog/bevy_pathfinding |
| repository | https://github.com/The-DevBlog/bevy_pathfinding |
| max_upload_size | |
| id | 1678187 |
| size | 834,066 |
A simple 3D Bevy plugin that combines flowfield pathfinding with boid-based collision avoidance to move units smoothly. Great for RTS games!

A grid-based navigation technique that first calculates the minimum “cost” from every cell to a target, then turns those costs into a field of simple direction vectors. Units just sample the vector under their feet each step to follow an optimal path with almost no per-unit computation.
A lightweight, local steering technique where each unit blends three factors—steering away from too-close neighbors (separation), matching their heading (alignment), and moving toward the group’s center (cohesion)—to naturally avoid collisions and maintain smooth, flock-like motion.
Actually, no. The Bevy Pathfinding crate features a powerful spatial partitioning (or bucketing) optimization. When you initialize the grid using: app.insert_resource(Grid::new(BUCKETS, MAP_GRID, CELL_SIZE));, you include a BUCKETS value. The grid is split equally into this BUCKETS value, so each boid is applying forces against other boids in the same bucket. Nice.
Be sure to play around with the example(s) and adjust the BUCKETS value. Then use the debug UI to visualize the buckets.
Add the bevy_pathfinding crate:
cargo add bevy_pathfinding
See the example for full setup instructions.
Note: When viewing examples, be sure to view all lines that have the // ADD THIS! comment, as this indicates what you will need to add in your own project.
cargo run --example <example name>
or to run with the debug UI:
cargo run --example basic --features bevy_pathfinding/debug
When using the debug UI settings, it will automatically update every boid in the scene with the values displayed in the UI. If you have multiple different units that require separate settings, this will be an issue. The debug UI is meant only for development purposes to easily visualize the behavior of the flowfield and boids. This will help you pinpoint the exact settings that are ideal for you.
Important Note! - If you have your own shaders applied, the debug UI may cause conflicts with them. It is recommended to disable your shaders while using the debug UI.
To run your project with the debug UI:
cargo run --example basic --features bevy_pathfinding/debug


| bevy | bevy_pathfinding |
|---|---|
| 0.16.0 | 0.1.0 |
Refer to the Changelog to view breaking changes and updates.
None yet