c-frame / aframe-extras

Add-ons and helpers for A-Frame VR.
https://c-frame.github.io/aframe-extras/examples/
MIT License
968 stars 308 forks source link

[nav-agent] switch to recast-navigation-js dependency #441

Open vincentfretin opened 6 months ago

vincentfretin commented 6 months ago

I had unresolved issues with pathfinding on some navmesh a colleague did in blender, on some areas, it just said it couldn't find a path to the destination and I was pretty sure the avatar was on the navmesh, or sometimes it did really weird thing, calculating the longest possible path instead of going to the destination as a straight line. The issues I had may have been an issue with how the navmesh was modeled or an issue in the algorithm in three-pathfinding, or both, I don't know, that why I wanted to test an alternative with those navmeshes, but lack of time of doing so.

The aframe-extras pathfinding solution is using https://www.npmjs.com/package/three-pathfinding There is an alternative that may be better that is https://github.com/isaac-mason/recast-navigation-js but we need to create the aframe component for it. Maybe it's possible to keep the nav-agent and nav-mesh components but switch to this different dependency?

If anyone is working on this, let me know.

Also somewhat related:

vincentfretin commented 6 months ago

Also:

vincentfretin commented 6 months ago

Dynamic navmesh: https://x.com/isaac_mason_/status/1769899647206936705 https://x.com/isaac_mason_/status/1770651009213473068

vincentfretin commented 3 months ago

@arvind-iyer created an aframe component that uses recast-navigation-js to bake the navmesh and export it to glb https://github.com/arvind-iyer/aframe-recast