Main script of this Path finding system. Calculates (find) path automatically or according to specified rules Generates array of waypoints (around obstacles) until target will be reached

Average structure looks like: 

  • target - Target/final point to build path to
  • waypoints - Array of generated waypoints
  • maxComplexity - Max number of waypoins in path
  • maxLookingDistance - Max distance of raycasts (looking for waypoint )
  • offsetFromObstacles - Set additional offset between waypoints and obstacles
  • autoUpdateTime - Delay to next path recalculation. Works automatically if updateOnTargetMove and manualUpdateOnly = false;
  • updateOnTargetMove - Update only if new target position different from previous one
  • manualUpdateOnly - Allow only manual updates by calling "FindPath" function
  • useZAxisAsHeight - By default path calculates in XZ plane, set it to true to use XY plane
  • ignoreTargetHeight - Ignore target Y (or Z) offset from this object
  • color - Debug path-visualization color