TheGrimsey / oxidized_navigation

A runtime Nav-Mesh generation plugin for Bevy Engine in Rust.
Apache License 2.0
169 stars 12 forks source link

Pass settings to the plugin itself #7

Closed Shatur closed 1 year ago

Shatur commented 1 year ago

The plugin won't work without initialized NavMeshSettings. So I would suggest to pass the settings directly into plugin as Bevy do for its plugin. This way user never forget to initialize it.

Shatur commented 1 year ago

And I would suggest to store the settings inside the NavMesh to avoid cloning it every time to pass it to find_path.

TheGrimsey commented 1 year ago

I've added a settings field to OxidizedNavigationPlugin.

Have not yet addressed the secondary suggestion though I will consider it.

Shatur commented 1 year ago

Great, thank you!

The idea of the secondary suggestion is also purely for ergonomics. To avoid having an extra system parameter with settings to and reduce the number of arguments of find_path.

TheGrimsey commented 1 year ago

As of 0.5 you are required to pass a NavMeshSettings when adding the plugin.