Grid Graph - Shortest Distance vs Minimum Nodes

I’d like my units to go directly from point A to point B if there are no obstacles in the way, instead of traveling across the nodes in a path. The units tend to ‘swing out’ and then come back, traveling across the nodes, instead of taking the most direct way to the target, and it would be nice to avoid that. Here is an image to clarify, instead of traveling directly to the wall, the skeletons go straight, and then cut up diagonally.

Anyone have any ideas on how to solve this?

I’m thinking I could do some analysis on my path after it is returned, and maybe use some raycasting to see if anything is hit, and if not, have the units travel directly between waypoints on the vectorPath that don’t have any obstacles in the way.


Try using the Raycast modifier or the funnel modifier (both not both at the same time).