stride icon indicating copy to clipboard operation
stride copied to clipboard

feat: DotRecast for navigation with support for Bepu

Open Doprez opened this issue 1 year ago • 4 comments

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

Doprez avatar Nov 23 '24 20:11 Doprez

That was really good to add Bepu Physics, as other PRs are coming with that! 🙂

VaclavElias avatar Jan 04 '25 19:01 VaclavElias

Do we need to add dotrecast here? https://github.com/stride3d/stride/blob/master/THIRD%20PARTY.md

VaclavElias avatar Mar 31 '25 18:03 VaclavElias

Do we need to add dotrecast here? https://github.com/stride3d/stride/blob/master/THIRD%20PARTY.md

Absolutely, thank you for reminding me!

Doprez avatar Mar 31 '25 18:03 Doprez

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

Doprez avatar Apr 02 '25 04:04 Doprez