angelscript

A* pathfinding not taking shortest path

允我心安 提交于 2019-12-10 22:20:49
问题 My A* pathfinding function always gets to its intended destination, but it almost always goes a bit out of the way. Here's an example: [I made a nice image to show my issue, but apparently it won't post until my reputation reaches 10; sorry, I'm new. :P] Essentially, it pulls left or up as much as possible without actually adding more tiles to the path. It sounds like an issue with calculating the gScore or possibly the part where a tile's parent can be reassigned based on neighboring tiles'