The path often curves unnecessarily or appears zigzagged

  • A* version: 5.3.7
  • Unity version: 6000.0.44f1

I have a Seeker component attached to a capsule object, and its movement is controlled via script.

I also tested by switching the heuristic algorithm to both Manhattan and Euclidean , but the results did not change.

zigzag03

zigzag04

It’s as if there’s something blocking the way — the path curves around for no clear reason, but then suddenly switches to a straight line at some point.

Below is the relevant code snippet.

The path is being recalculated every 0.2 seconds on a fixed interval.

Other than calling StartPath() , I’m not doing anything else with the path, so I’m not sure what’s going wrong…

I’ve attached more images to help clarify what’s happening

화면 기록 2025-05-31 오후 7.53.55

화면 기록 2025-05-31 오후 7.53.55

ok, the issue was resolved by simply adding a Funnel Modifier

the core mechanism of this awesome asset involves dividing the navigable area into triangles , then connecting the centers of those triangles to form a path. as a result, the generated path can naturally appear zigzagged , even when a more direct route exists

what I was missing was the Funnel Modifier , which smooths the path into a visually cleaner and more direct route

once added, the path followed the expected shortest path more accurately

1 Like

Yup! Nicely found :+1: If you run into any more issues let us know

1 Like