Path doesn't fail, But I need it to

Hi,

I am creating a tower defence game. And one of the features is making sure the user cannot place a tower which will block the path of the enemies.

But the path cannot be blocked, even if I fill up the grid with towers, the enemies still find a path. But they shouldn’t.

Any ideas why? I looked at the docs about making sure something can’t be placed if it will prevent a path being calculated but the path won’t fail so this doesn’t work.

Any help?

Thanks.

Try to decrease the Max Nearest Node distance in A* Inspector -> Settings. This will make it fail if it cannot find a close enough node.

Also see: http://www.arongranberg.com/vanillaforums/discussion/comment/158/#Comment_158
And some beta docs (since the current one does not include some parts): http://arongranberg.com/astar/docs_beta/class_pathfinding_1_1_graph_update_utilities.html#a5cca2a0658c53d66d366a2ba495498f1