# Is it possible to change how navmesh pathfinding behaves?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-change-how-navmesh-pathfinding-behaves/121611>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [January 26, 2019, 2:43pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-change-how-navmesh-pathfinding-behaves/121611 "2019-01-26T14:43:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bASteker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bASteker](https://forums.unrealengine.com/u/bASteker)\
**Post date:** [April 2, 2020, 12:36pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-change-how-navmesh-pathfinding-behaves/121611/4 "2020-04-02T12:36:20Z")

</div>

Late Answer:  
You can use **FNavMeshPath::OffsetFromCorners** for this. But it is now available in blueprints.

There is an example in **ANavigationTestingActor::SearchPathTo** function.

```auto

FPathFindingResult Result = NavSys->FindPathSync(NavAgentProps, Query, Mode);

    const double EndTime = FPlatformTime::Seconds();
    const float Duration = (EndTime - StartTime);
    PathfindingTime = Duration * 1000000.0f; // in micro seconds [us]
    bPathIsPartial = Result.IsPartial();
    bPathExist = Result.IsSuccessful();
    bPathSearchOutOfNodes = bPathExist ? Result.Path->DidSearchReachedLimit() : false;
    LastPath = Result.Path;
    PathCost = bPathExist ? Result.Path->GetCost() : 0.0f;

    if (bPathExist)
    {
        LastPath->AddObserver(PathObserver);

** if (OffsetFromCornersDistance > 0.0f)
        {
            ((FNavMeshPath*)LastPath.Get())->OffsetFromCorners(OffsetFromCornersDistance);
        }**
    }

```

You can also find variable \*\*bUseBetterOffsetsFromCorners (\*\*use it by changing BaseEngine.ini) - but i don’t know what it does exacly.

```auto

/** TODO: switch to disable new code from OffsetFromCorners if necessary - remove it later */
    UPROPERTY(config)
    uint32 bUseBetterOffsetsFromCorners : 1;

```

But 2 warnings:

1. It’s not cheap (you can use STAT\_Navigation to see how exepnsive it is)
2. In 4.17 (i was using it then) version there was a bug - not sure if it’s fixed. In 99.9% OffsetFromCorners worked as expected but in very rare occasions when there was long path to change, after using this function the path was broken - it could lead pawn in areas without navmesh.

---

_[View the full topic](https://forums.unrealengine.com/t/is-it-possible-to-change-how-navmesh-pathfinding-behaves/121611)._
