Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to Bake A Navmesh on Walls of a maze environment

Discussion in 'Navigation' started by Pouya_Jigsaw, Jul 22, 2019.

  1. Pouya_Jigsaw

    Pouya_Jigsaw

    Joined:
    Sep 9, 2018
    Posts:
    10
    Hi.

    I'm trying to build a game which is in a maze and there are enemies moving on walls. I want to bake nav mesh surface on walls rather than on the surface. is it possible? when i say walls, i mean every side of the walls.
     
  2. mistergreen2016

    mistergreen2016

    Joined:
    Dec 4, 2016
    Posts:
    226
    create a plane, for visual guide, rotate it parallel to the walls, attach a navmesh surface component to it, and bake. You should get navmesh on the walls.
     
    Pouya_Jigsaw likes this.
  3. Pouya_Jigsaw

    Pouya_Jigsaw

    Joined:
    Sep 9, 2018
    Posts:
    10
    Thanks for the advice!

    i did it and it worked but the problem is how can i create off mesh links automatically between walls.
    because there are four different navmesh surface it doesnt generate off mesh links between them.
     
  4. mistergreen2016

    mistergreen2016

    Joined:
    Dec 4, 2016
    Posts:
    226
    I'd add a offmeshlink component manually to the wall and manually connect it to the ground. You can specify the width/size of the offmeshlink. I guess you can code to automatically do it for you with the navmesh API, but that's beyond me.
     
    Pouya_Jigsaw likes this.