Search Unity

Question Virtual objects in AR environment navmesh help

Discussion in 'Unity MARS' started by Gareth-Tech, Mar 31, 2021.

  1. Gareth-Tech

    Gareth-Tech

    Joined:
    Jul 10, 2015
    Posts:
    20
    Hi everyone,

    I need to get some virtual objects working in line with what MARS is doing with the real world environment.
    I can't seem to get NavMesh obstacles to work as well as generating a NavMesh on the top surface for the player to move on to.

    Any guidance or support would be amazing :D
     
  2. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
    Hello @Gareth-Tech,

    The MARS NavMesh package contains some scripts and a sample built on top of the Unity NavMeshComponents scripts to demonstrate how to use NavMesh in AR with MARS, have you checked that out?

    You can open the Hello Navmesh scene in the root of the package for an example of how to use this extension.
     
  3. unity_andrewm

    unity_andrewm

    Unity Technologies

    Joined:
    Jun 25, 2015
    Posts:
    73
    Hi Gareth,

    If you're generating the navmesh obstacles with the stretched cube, you can generate a navmesh surface on top. What I would do is just slightly center the obstacle downwards so it doesn't overlap with the top level surface, but cuts through anything beneath it.