A* Pathfinding Project  4.0.9
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
Using Modifiers

Modifiers are small scripts which can hook in to the Seeker and pre and or post process the path before it is returned to the caller.

This can for example be a Raycast Modfier which removes unecessary nodes in a path to make it shorter but still valid.
Or a Smooth Modifier which subdivides the path and smooths it to make it more aesthetically appealing.

Simple Smooth Modifier

The simple smooth modifier is a modifier to smooth the path. It can do that either by just subdividing it and moving the vertices closer to each other or use splines, namely the Bezier curve.
Below are two images showing a path with the smooth modifier turned off first and then on. Note that the smoothed path cuts the corners a bit, this can be a problem with the smooth modifier since it does not take world geometry into account when smoothing.

For variable documentation, look at the Simple Smooth Modifier documentation

Funnel Modifier

The funnel modifier is a modifier for simplifying paths on navmeshes or grid graphs is a fast and exact way.
As the name implies it applies the funnel algorithm to the path.
This will return the shortest path inside the path corridor the pathfinder calculated


You can see a list of all modifiers if you click on Modules above and go to "Modifiers".

See Also
Writing Modifiers