Basic components


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 



This is example script to follow path.
It manages waypointed path from pathFinding Script and move object along it.

Average structure looks like: 

  • pathFindingScript - Path holder/generator script
  • damping - Smooth facing/movement value
  • movementSpeed - Speed of object movement along the path
  • waypointActivationDistance - How far should object be to waypoint for its activation and choosing new
  • stuckDistance - Max distance of move per regenTimeout that supposed to indicate stuck
  • stuckTimeout - How fast should path be regenerated if player is stuck