Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Use Unity pathfinding on Hololens

VirdianVirdian
edited July 2017 in Questions And Answers

Hi everyone!

I'm currently working on a game in which several creatures need to follow the player. I've manage to scan the room using HoloToolKit, but I have no idea how to use the spatial mesh to create a NavMesh dynamically. Does anyone have an idea on how I could do that?

Thanks,

Virdian

Answers

  • I haven't worked with NavMeshes dynamically in Unity before, but I personally recommend looking at the A* Pathfinding plugin: https://arongranberg.com/astar/

    I used it a little while back for a HoloLens Unity app that involved real-time pathfinding using the spatial mesh. Basically, you can specify a grid of nodes that covers your play area, then set up the plugin to do raycasts against the spatial mesh to determine where the floors (and thus the navigable areas) are, and how to find the shortest path from point A to point B along the current state of the mesh.

  • I haven't worked with NavMeshes dynamically in Unity before, but I personally recommend looking at the A* Pathfinding plugin: https://arongranberg.com/astar/

    I used it a little while back for a HoloLens Unity app that involved real-time pathfinding using the spatial mesh. Basically, you can specify a grid of nodes that covers your play area, then set up the plugin to do raycasts against the spatial mesh to determine where the floors (and thus the navigable areas) are, and how to find the shortest path from point A to point B along the current state of the mesh.

  • Hi,

    Thank you for your answer. Finally I found an external tool from Unity that allow to build NavMesh at runtime fairly easily: https://github.com/Unity-Technologies/NavMeshComponents

  • Is there some "how to" out there how to add the Nav Mesh components to die Spatial Mapping from the Hololens?

  • I haven't found one yet. If anybody knows of one please do let us know.

  • Hello, I have the same problem... using A* from Aron Granberg and NavMeshComponents plugin. I don't know how to extract the Hololens navmesh to inject it in A* component. Did you find a solution? Thanks.

  • Please if someone found any solution do post it here. It will be really helpful. Thanks in advance!

Sign In or Register to comment.