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