Pathfinding: Clicking close to obstacles

Hi there. I use pathfinding and got it nicely running. Except for obstacles. I just added one square obstacle in the middle of the scene. Clicking far enough away from the obstacle a path is found for the little guy walking around. Clicking on the obstacle no path is found (which is okay with me but better would be if the little guy just approaches the obstacle). Clicking besides the obstacle at quite a distance of 10 or 20 pixels or so, no path is found. This will irritate the players of the game. Is it normal behaviour or did I miss a setting or something?

Are you using the pathfinding grid?

If you mean the virtual cell size: Yes, I use virtual cell size 20, otherwise the character slows down too much and walks too close to obstacles (walls). But what I seem to understand: Mouse clicks to set a path check for center points of obstacles. So clicking close to a long rectangular obstacle but far away from its center point sets a new path. Clicking equally close to an obstacle but close to its center point does not set a new path. Or maybe it’s really connected to the grid size only. I’ll fiddle around with those parameters some more (smaller grid size, more speed, extra border).

If you click somewhere, the character goes to the cell you clicked on. If you click somewhere else, but still in that cell, the character won’t move.