aframe-extras icon indicating copy to clipboard operation
aframe-extras copied to clipboard

[pathfinding] Nav-mesh to avoid collision with moving objects

Open rrrepos opened this issue 6 years ago • 3 comments

This is more like a feature request (or its integration with physics).

The use-case being that there is a (one or more) moving object in a scene and that could be in the path of the user. How do we avoid colliding with it.

rrrepos avatar Apr 27 '18 03:04 rrrepos

Hi @rajnikantmrao — for now this isn't really supported. The proper way to implement it would be for the navigation system to dynamically modify the navigation mesh around objects with a nav-obstacle component, as those objects move. Maybe in the future, but it's fairly complex and so I can't make any promises there. Using both physics and a navmesh for player movement obstacles is also not supported, although physics can still be used for other interactions while a navmesh is used for movement.

If you have a simpler use case (e.g. a door opens up when the user completes a level) you can change the navigation mesh yourself, and then call navMeshEl.components['nav-mesh'].loadNavMesh().

donmccurdy avatar Apr 28 '18 23:04 donmccurdy

Thanks @donmccurdy for the detailed response. I find the navmesh useful for my use-cases and keenly look forward to the enhancements. The collisions of the avatars is not a serious issue since I am sure, knowingly, folks will not want to "step on one another's toes" ... literally. Thanks for providing such excellent components that lets us focus on the applications.

rrrepos avatar Apr 29 '18 02:04 rrrepos

Or should I keep it open? Your call @donmccurdy

rrrepos avatar Apr 29 '18 04:04 rrrepos