A* Pathfinding Project

8 directions movement using Point Graph


Hi there! I am impementing a combat based on a square grid. I am using A* to do the pathfinding between the character and the enemies.

My problem is the characters only can move on four directions and not on diagonal. I changed the number of neightbours of a Point Graph to use 8, but only can use 4.

Is possible to do that?




Are you sure you are using a point graph and not a grid graph? Point graphs do not have setting for neighbours.


Well, I creating the graph dinamically so all the Point graphs area created dinamically. The number of neightbours is passed to the function that creates the graph point to indicate what graph points should be connected.


Okay… What function is this?