feat: DotRecast for navigation with support for Bepu
PR Details
- re-adds the bepu navigation library to the source.
- Moves the core Dotrecast logic out of the Bepu library for others to use elsewhere.
- Adds extra configuration to pathfinding options
- Adds the ability to build multiple nav meshes with different configurations
- Adds the Collision mask to the build when gathering colliders
- Lots of clean up for better readability
Related Issue
None.
Types of changes
- [ ] Docs change / refactoring / dependency upgrade
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [ ] My change requires a change to the documentation.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] I have built and run the editor to try this change out.
Remaining work
Remaining changes I want to make for this PR:
- Dedicated collider tracker (similar to how Bullet sends an event to notify navigation build events)
- conversions to DotRecast colliders (Will be more useful with dynamic meshes)
- Dynamic meshes.
- A couple more separation of concern changes for the current builder
That was really good to add Bepu Physics, as other PRs are coming with that! 🙂
Do we need to add dotrecast here? https://github.com/stride3d/stride/blob/master/THIRD%20PARTY.md
Do we need to add dotrecast here? https://github.com/stride3d/stride/blob/master/THIRD%20PARTY.md
Absolutely, thank you for reminding me!
I finally have gotten around to finishing the dynamic mesh core functions and everything seems to be working with the new DotRecast library.
There are absolutely things that will need to be improved/researched:
- gathering shapes is done by iterating added entities in a scene (Works fine but the performance of a game with a bunch of spawned entities may be impacted more then I intended)
- getting bepu shape data is done in the most basic way (works fine but I'm not sure if the volume of an obstacle may be needed)
- obstacles ALL cut the mesh instead of having the ability of just having basic avoidance (Maybe this can be done by users anyway but maybe it should be done internally)
- No off mesh links are functioning
- No crowd simulation built in
- moving platforms/tracking obstacle moves instead of only on add and on remove is not implemented
- General performance improvements (I'm sure what I have done could be done better but I just wanted to get something out before I became busy again)
- A better way for agents to select the navmesh (Ill probably just copy what Eideren did for the bepu sim selectors)
- Scene changes as well as adding child scenes will be an issue here