Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[Pathfinding] Get smoother ways

Discussion in 'Navigation' started by StonedLover, Sep 10, 2016.

  1. StonedLover

    StonedLover

    Joined:
    Apr 16, 2014
    Posts:
    45
    Hello,
    Since I playing the last couple days a little bit with the NavMeshAgent System from Unity I come to an Issue which makes a lot of problem. Is there an way to tell the Agent to keep a min distance to the edge of the walk-able area, so they don't walk all the time at the corner. Ofc he should still walk there but the most movement should be happen in the center of the walk-able area.

    Do someone know how you could deal with it ?

    MfG StonedLover
     
  2. Jim_West

    Jim_West

    Joined:
    Aug 5, 2013
    Posts:
    47
    You need to bake your mesh different then. Raise the agent Radius in the Bake settings.
     
  3. StonedLover

    StonedLover

    Joined:
    Apr 16, 2014
    Posts:
    45
    Well the problem is this just raise the distance to static objects I want them to have a diffrent distance to the Walkable layers I will post a example
     
  4. StonedLover

    StonedLover

    Joined:
    Apr 16, 2014
    Posts:
    45
    The red one is how he would walk green would the way he should. And the arrows shows I need this distance to reorganize the waypoint.
     

    Attached Files:

  5. Jim_West

    Jim_West

    Joined:
    Aug 5, 2013
    Posts:
    47
    The nav system is designed to search the shortest route, not the smoothest one.
    I don't think that theres a way to do that with the built in nav-system so you have to right your own one.
     
unityunity