seldom_map_nav
seldom_map_nav
is a Bevy plugin that does navmesh generation, pathfinding, and navigation
for tilemaps. Navmesh generation is available without Bevy dependency. It is agnostic
to the solution you use for your tilemaps, but doesn't require much glue. It is also agnostic
to your position type, as long as it implements Position2<Position = Vec2>
from seldom_interop
(ex. Transform
).
It's compatible with seldom_state
with the state
feature.
seldom_state
This crate is currently is maintenance mode, so I'm not currently adding new features.
The generated paths are not always optimal, even with the greatest quality settings, but I do not plan to fix this myself. If possible, I may switch dependencies to improve this, though.
seldom_state
CompatibilityThe Pathfind
component and NavBundle
work as states without enabling the state
feature.
However, if the state
feature is enabled, it will trigger the DoneTrigger
when it is done
navigating (if it reaches the destination or cannot find a path).
Add to your Cargo.toml
```toml
[dependencies] seldommapnav = "*" ```
To generate navmeshes without Bevy integration, disable the bevy
feature
and use Navmeshes::generate
or seldom_map_nav::mesh::generate_navmesh
.
See the no_bevy.rs
example.
To generate paths without using the built-in navigation, add the MapNavPlugin
to your app,
add the Navmeshes
component to your tilemap (or some other entity), and add
the Pathfind
component to your navigating entity. To use the built-in navigation, also add
the Nav
component to your navigating entity. See the nav.rs
example. If you are having trouble
getting it to generate a path, enable the log
feature, and it might tell you what's wrong.
If you need help, feel free to ping me
on the Bevy Discord server (@Seldom
)! If any of the docs
need improvement, feel free to submit an issue or pr!
| Bevy | seldom_state
| seldom_map_nav
|
| ---- | -------------- | ---------------- |
| 0.10 | 0.5 | 0.3 |
| 0.9 | 0.3 | 0.2 |
| 0.8 | 0.2 | 0.1 |
seldom_map_nav
is dual-licensed under MIT and Apache 2.0 at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.