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

NavMesh on Walls or Non horizontal surface

Discussion in 'Navigation' started by yrecros9, May 16, 2017.

  1. yrecros9

    yrecros9

    Joined:
    Sep 9, 2015
    Posts:
    1
    Hello!

    I was just wondering if it is possible to bake a navmesh on a surface that isn't flat (i.e. the ground). I want to be able to have ai wandering around on the ceiling and on the walls. Is there any way to get the nav mesh baker to accept a user defined function for the local direction of up?

    I've searched online and found some things that can be downloaded to make it possible in unity 5.6. However, it looks like it won't be available until 2017.1? I was just wondering if it was possible using the current tools without downloading anything. Any thoughts?
     
  2. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Totally doable, it's quite easy in 5.6. Create an empty gameobject, add navMeshSurface.cs. rotate the GO so that it's up vector matches the up vector you want and bake. Play around with it. I have Nav meshes completely covering a globe using 6 nav mesh surface GOs with varying rotations.

    https://github.com/Unity-Technologies/NavMeshComponents

    Prior thread showing spherical pathing

    https://forum.unity3d.com/threads/navmesh-on-a-sphere-possible-with-5-6.463972/

    And one with walls... Moving walls even

    https://forum.unity3d.com/threads/d...ating-a-navmesh-surface-navmesh-agent.467914/
     
    Last edited: May 16, 2017
    Trungdv and MarkoStarr like this.
  3. scradsleep

    scradsleep

    Joined:
    Nov 7, 2019
    Posts:
    21
    have done that and nothing is happening
     
  4. scradsleep

    scradsleep

    Joined:
    Nov 7, 2019
    Posts:
    21
    can you please point out what i am doing wrong not that i have done anything but it dosent seem as simple as what you have said my sphere is 1000diameter and no navmesh is showing up on it like your video in the other tread suggest but i see you have the script on the sphere and it also looks diffrent to mine and there seems to be no navmeshdata i dont understand bit lost on this one
     

    Attached Files: