NavMesh Navigation
Details on how to add NavMesh Navigation in MultiSet Unity SDK
1. Import 3D Mesh from Developer Portal
Download the 3D Mesh (.glb) of a Map or MapSet from the Developer Portal and import it into Unity (under MapSpace Gameobject)

2. Add Unity NavMesh Surface component to this Mesh
Install Unity NavMesh package: com.unity.ai.navigation Select the Mesh -> Component -> Navigation -> NavMesh Surface

3. Add Unity NavMesh Surface component to this Mesh
Once NavMesh Surface component is added, adjust the NavMesh settings as per your scan under Window -> AI -> Navigation, and then select the Mesh and click on bake.


4. Check the baked surface
Check the baked surface; the blue colour is the detected path that is used later in finding paths. You can adjust the NavMesh surface setting based on your map scan area.
In some areas of the Mesh ground might not be accurate, in those cases, place planes inside the map just slightly above the ground those planes are just used for NavMesh baking and need to be deactivated later

5. Add a Navigation sample in NavMesh
Attaching the Agent
To set up agent navigation in your AR or camera-based scene, you'll need to follow these key steps:
Camera Attachment
Attach the navigation agent to the Main Camera or the primary camera used for the AR session. This ensures the agent's navigation is synchronized with the user's device perspective.

Path Rendering
By default, agents will continuously move towards their destination. To visualize the path without actual movement, you'll need to:
Stop the agent's movement using the
isStopped
propertyUse the LineRenderer component to draw the calculated navigation path
LineRenderer Configuration
Configure the LineRenderer to:
Render the path's trajectory
Customize visual properties like width and color
Provide a clear visual representation of the potential agent movement
Unity automatically calculates the shortest path between two points. Add obstacles and modifiers to improve the pathing.
Check Unity documentation here for detailed explanations of navigation. Also, check out videos of Joshua Drewlow's detailed explanations on Unity + NavMesh for navigation
Last updated
Was this helpful?