Equivalent of SamplePosition?

Hi,

Is there an equivalent of Unity’s NavMesh.SamplePosition for the NavMesh grid in A* Pathfinding Project? If not, it would be good to get an equivalent. We use NavMesh.SamplePosition for editor tools to allow us to place objects only on walkable areas. Is there an alternative way to do this with this system?

Thanks

Hi

var info = AstarPath.active.GetNearest(myPosition, NNConstraint.Default);
var position = info.clampedPosition;

Note that the graph needs to be scanned in the editor for this to work properly.

This is no longer valid in 5.3.8, what’s the new call?

Check the upgrade guide here: Upgrade Guide - A* Pathfinding Project