How to make the AI follow a moving object so if the object changes direction the ai will calculate a new path to the targets current direction?
Edit: Or apparently you could take a look at one of the other scripts provided, like the AIPath script.
A simple (but inefficient) solution would be to update the new target position in your agent’s FixedUpdate() function then immediately recalculate the path.
So if you were hunting down your player object it might look like this:
targetPosition = GameObject.FindGameObjectWithTag(Tags.player).transform.position;
seeker.StartPath(transform.position, targetPosition, OnPathComplete);