Class NavmeshClamp Extends MonoBehaviour
Public
Attach to any GameObject and the object will be clamped to the navmesh.
If a GameObject has this component attached, one or more graph linecasts will be carried out every frame to ensure that the object does not leave the navmesh area.
It can be used with GridGraphs, but Navmesh based ones are prefered.
Note
This has partly been replaced by using an RVOController along with RVONavmesh. It will not yield exactly the same results though, so this script is still useful in some cases.
A* Pro Feature:
This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited.
The Pro version can be bought here
Private/Protected Members
LateUpdate
()
Private
prevNode
Private
prevPos
Private