Pathfinding automatism borders

Hi community,
I’m working on a maze like game where the size of every object is a multiple of 16x16 pixel.
The issue I am encountering is that the fields directly adjacent to an obstacle cannot be set as a move target.
The virtual cell size is 16x16 and the “extra border size” is 0 although changing the value doesn’t do anything (neither a positive nor a negative value).
What would I have to do in order to walk to a field right next to the wall (red marked area)?


  • blue dot = player (with pathfinding automatism)
  • red dot = target (gets moved on mouseclick)
  • grey box = wall (pathfinding obstacle - impassable)[/code]
    If you would like to see an example download the “” project from this post:

Thanks in advance :slight_smile:

I’ve made a fix to make sure that cells adjacent to obstacles can be reached.So now all cells including the red ones can be reached, except of course the ones with an obstacle on it.

Your example was very useful! I’m going to use it to make further investigation on the pathfinding. :slight_smile:

Wow that was quick. Merci beaucoup : :mrgreen: