I came across a weird problem while making a game. Enemy npcs are like this - if you arent doing anything, pathfind to a random position(random x,y). If failed to find path, again - pathfing to a random position Once path found, move along it and etc... Everything should work okey, but when the npcs get near the walls, they just stop moving and stand there. I Believe that npcs have found a path, but its in the wall or something like that. and because of that, they arent doing anything. Shouldnt it be "failed to find path" at that moment ? hmmm