---
title: "Follow Spline / AIController"
---
In Class: `CustomAIController`

While Navigation builds on the UE AI Controller / Character Movement with NavMeshes, I wanted to implement a more precise way to control the path a NPC takes. Turns out, Unreal doesn't seem to have a "Follow Spline" logic inbuilt, which I found to be a bit trickier than expected. It's currently based of [this Tutorial](https://www.youtube.com/watch?v=UIF1PcmZkGA), which calculates a speed factor from Max Walk Speed and Spline Length and then continuously moves the Actor to the new Point along the Spline at that Value. Adding Jump functionality with this approach added extra complexity as the timeline needs to stop at the correct distance from the Character for the AI not to get confused.




```{=html}
<iframe width="100%" height="500" src="https://blueprintue.com/render/-azlwrm2/" scrolling="no" allowfullscreen></iframe>
```