grid - A Star Pathfinding -
i've implemented standard a* pathfinding algorithm , have working fine on 2d grid.
my question is, there way weight lines take "straightest" path instead of potential shortest path takes. instead of lines taking short path , moving in zigzag pattern try find right angle first.
any links resources or advice appreciated!
do mean they'd move diagonally on grid? you'd have open node expanding code expand (+1, +1), (-1, -1), (+1, -1) , (-1, +1), turning orthogonal instead of cardinal. if a* algorithm correct, favour single diagonal move on east north move.
if mean move across larger areas freely, different , harder do.
Comments
Post a Comment