MultiSet
Developer PortalContact UsTutorials
  • MultiSet Developer Docs
  • Getting Started
    • Changelog
    • VPS SDK : Unity Guide
    • FAQ
  • Basics
    • Maps
      • Mapping Instruction
      • Mapping Planning
      • Mapping Equipment
    • MapSet : Multiple Maps
      • Merging Maps without Overlap
        • Extend a MapSet
      • Merging Maps with Overlap
      • Adjust Map Transformation
    • App Localization
    • Credentials
    • Analytics and Usage
    • Downloads
    • REST API Docs
    • WebXR Integration
    • Third Party Scans
      • Matterport
      • Leica Scans
    • MapFoundry
    • Georeferencing Maps
    • On-Premises Localization
  • Unity-SDK
    • Authentication
    • MultiSet package import
      • Universal 3D (Core) support
    • Sample Scenes
    • On-Cloud Localization
      • Individual Map
      • MapSet (Multiple maps)
        • Hint MapCodes
      • Pose Prior : HintPosition
    • Occlusion
    • NavMesh Navigation
  • Support
  • Native Support
    • iOS Native
    • Android Native
Powered by GitBook
On this page
  • 1. Import 3D Mesh from Developer Portal
  • 2. Add Unity NavMesh Surface component to this Mesh
  • 3. Add Unity NavMesh Surface component to this Mesh
  • 4. Check the baked surface
  • 5. Add a Navigation sample in NavMesh
  • Attaching the Agent

Was this helpful?

  1. Unity-SDK

NavMesh Navigation

Details on how to add NavMesh Navigation in MultiSet Unity SDK

PreviousOcclusionNextSupport

Last updated 6 months ago

Was this helpful?

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:

  1. Stop the agent's movement using the isStopped property

  2. Use 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 for detailed explanations of navigation. Also, check out videos of 's detailed explanations on Unity + NavMesh for navigation

here
Joshua Drewlow