Alternatively you could use SimplePath (search for forums for it) which implements functions to find the nearest character or nearest character position and implements a controller to take the NPC to the position. My pathfinding service Polaris-Nav will also use this controller: