I would like to find path that has minimal turns (or you can say minimal nodes) on a square grid with several solid obstacles placed in the grid randomly - Note that this is not necessarily the shortest path found by the pathfinding behavior...I have tried this already. Also pls note that - I have disabled diagonals in pathfinding behavior to make it travel only in straight lines on the grid.

Any ideas on how to achieve this? Looks like I cannot use Pathfinding behavior for this as it always tries to find path with minimal distance but not minimal turns...I am trying to make a Onet game.