Back to search
PatternGold tierAI

Simple AI patrol between waypoints using spline or array of points

Updated 3mo ago
UE 5.0UE 5.1UE 5.2UE 5.3UE 5.4UE 5.5UE 5.6UE 5.7#ai#patrol#waypoint#navigation#npc

Reference

Pattern: Variables PatrolPoints(Array<Vector>), CurrentIndex(int)=0. BeginPlay: SimpleMoveToLocation(PatrolPoints[0]). OnMoveCompleted (or Tick+distance check): SET CurrentIndex = (CurrentIndex+1) % Array_Length → SimpleMoveToLocation(PatrolPoints[CurrentIndex]). Add Delay between moves for wait time. Use AIMoveTo for more control.