Pathfinding isn't something new, and I've actually coded A* in C++ years ago... not sure if it's still on the blog somewhere. But I was like.. yeah, pathfinding rules! Let's code it up in Unity! Plus I've not had a chance to play with the new UI in 4.6, so this was good fun.
The distance parameter, H, changes the results quite dramatically. Originally, I used the Manhattan Distance (I was following this tutorial) and while you get a solution, it was quite meh. Changing it to simply the distance between the selected node and target provided a much improved result.
No comments:
Post a Comment