Why the LayeredGridGraph.GetNearest() function ignores the constraint parameter?

Hi there,
I would like to know why the GetNearest() function of the LayeredGridGraph class ignores the constraint parameter. The parameter is passed to the function, but inside the code it is ignored.

Instead we are using the GetNearestForce() function, which does use it, but it will probably have an impact in the game’s performance.

Thank you.

Hi

Yes, this was a bit of a weird design decision. In general, the GetNearest functions in the released version will ignore the NNConstraint, unless they can take it into account at no additional performance cost. In the beta version this has been changed so that the GetNearest function always takes the NNConstraint into account, and there’s no GetNearestForce method anymore.