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

[Solved] Problems with Navigation Static

Discussion in 'Navigation' started by Cragrat, Jun 15, 2017.

  1. Cragrat

    Cragrat

    Joined:
    May 16, 2017
    Posts:
    5
    Using Unity 5.6.1f1
    I have added a bridge in to my scene made of individual parts. I have tried to bake this in to the navmesh using navigation static with limited success. As you can see in the picture below, only part of the bridge has baked in to the navmesh (stairs on either end and the first flat section on the right). I don't understand why the other 2 sections have not been baked in as well, they are duplicate parts and have navigation static selected also.

    upload_2017-6-15_14-27-52.png

    I have a AI character in my scene which is supposed to follow the player. He gets on to the bridge ok, but will not follow the player beyond this point. When the player reaches the other side of the bridge, he attempts to path find all the way round the river. I'm assuming this is because the middle section of the bridge is missing from the navmesh.

    upload_2017-6-15_14-27-13.png
     

    Attached Files:

  2. Denmla

    Denmla

    Joined:
    Aug 22, 2014
    Posts:
    41
    Maybe try to make fake bridge on top of original one ? I don't think this is best solution for this but it can be done quickly and it can do its job. Position cube slightly above the bridge and bake it so the missing part can join ,after that just disable cube.
    ( Image 1 - http://imgur.com/a/XZzA2
    Image 2 - http://imgur.com/a/mJ9Lv )
     
  3. Cragrat

    Cragrat

    Joined:
    May 16, 2017
    Posts:
    5
    It worked........almost!
    The cube just above the bridge has allowed the AI character to cross the bridge up to the stairs on the left, where there is a tiny break in the navmesh and he once again tries to path all the way around the river to get to the player. I've tried moving and resizing the cube, moving the left hand set of stairs and adding another cube at the break with no success. Even tried Generate Off Mesh Links which just resulted in paths being added for the AI to throw itself off the bridge and into the river! Not what I want here! Starting to get very frustrated at this!

    upload_2017-6-17_11-22-35.png
    It's worked!

    upload_2017-6-17_11-23-14.png
    Oh no it hasn't!
     
  4. Denmla

    Denmla

    Joined:
    Aug 22, 2014
    Posts:
    41
    Try adding 2 more cubes at sides so it covers whole bridge now.Mine works just fine if i do that just be careful of angle not to be above 45 degrees.Hope this will help
     
  5. Cragrat

    Cragrat

    Joined:
    May 16, 2017
    Posts:
    5
    Yep, that works.
    Thanks for your help!