romlok / godot-gdhexgrid

A GDScript hexagonal grid implementation for Godot.
MIT License
199 stars 24 forks source link

Goal is left out of path when goal is in path_obstacles even if its cost is non-zero #3

Closed alexgit53 closed 5 years ago

alexgit53 commented 5 years ago

In pathfinding, the goal is assumed to be impassible if it exists in path_obstacles, even if the cost in path_obstacles is not 0.

Effectively this means that path_obstacles can't be used for non-blocking obstacles.

I have a fix for this (it's just one line) - I'll put in a pull request when I can figure out how Github works.

romlok commented 5 years ago

Good catch, thanks for reporting and posting the pull request. I've also added a test for this, so any future regressions can be caught. :)