How to reconfigure AIPath.cs to use a Rigidbody instead of a CharacterController?

I would recommend that you use a simple Physics.Raycast call every frame to figure out where the ground is. That is cheaper than using a character controller/rigidbody but it solves the issues with the terrain height.