NavMesh Navigation
Details on how to add NavMesh Navigation in MultiSet Unity SDK
Last updated
Details on how to add NavMesh Navigation in MultiSet Unity SDK
Last updated
Download the 3D Mesh (.glb) of a Map or MapSet from the Developer Portal and import it into Unity (under MapSpace Gameobject)
Install Unity NavMesh package: com.unity.ai.navigation Select the Mesh -> Component -> Navigation -> NavMesh Surface
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.
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
To set up agent navigation in your AR or camera-based scene, you'll need to follow these key steps:
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.
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
property
Use the LineRenderer component to draw the calculated navigation path
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