Search Unity

Setting up Nav Mesh

Discussion in 'Navigation' started by Shadowing, Jun 9, 2017.

  1. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Idk been messing with it for a while. Can't get the blue to cover the entire map.
    I want most of this walkable for my AI.


     
  2. Jakob_Unity

    Jakob_Unity

    Joined:
    Dec 25, 2011
    Posts:
    269
    Have you tried increasing the step height as suggested in the warning ?
     
  3. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Thanks for the response.
    Ya ofcourse. same amount of blue area shown when I do that.
    Should I not pay attention to the blue area?
     
  4. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I've tried every possible setting combination.
    I finally got this far though.
    My guys get stuck though. They are just walking a straight line to and they don't even try to avoid a non blue area.

     
  5. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Could it be cause im updating the Target inside Update?

    Code (csharp):
    1.  
    2.     private void Update(){
    3.  
    4.  
    5.         float distance = Vector3.Distance (transform.position, Target.transform.position);
    6.         if(distance > 4f) {
    7.             agent.destination = Target.transform.position;
    8.         }
    9.  
    10.  
    11.     }
    12.  
     
  6. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Never mind I fixed this issue. It was the controller that I use that I had to adjust as well.