Thursday, July 30, 2015

path finding - A star pathfinding and discrete/smooth positions



The A* (A-star) algorithm usually represents a path on a grid.


Once a path has been found, however, the path looks blocky and is not suited if you move your units with floating point datatypes.


Here is an image describing the problem. The whites tiles represent the path found by A*. The black line path is the path I want, the red line path is the one I don't.


here is the picture


One solution would be to select a corner when the path turns, and switch/keep side when the path turns the other way. Seems like the most logical and cleanest way to do this.




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...