JulianGrey / Unity3D_Pathfinding

Slowly but surely learning how to program pathfinding, with the view of making a game or virtual world out of it.
0 stars 0 forks source link

8-way cutting corners #4

Closed JulianGrey closed 9 years ago

JulianGrey commented 9 years ago

Using the new 8-way pathfinding that I have created, if the object tries to from one side of a node to the other, it will cut the corners diagonally, rather than going around the node. While it doesn't look too bad with spherical nodes, using this with tiles or other rectangular or rhomboid shapes may result in visually poor results.

The plan is to code the pathfinding in such a way that if an object encounters a wall or node, it should check if it is "cutting across" an unwalkable node, correcting its path to go around the node if this is the case.