Thought I would update my problem here. I have come across an issue that I'm struggling to resolve.
Upon pressing a switch, an obstacle tile moves well out of the way.
Upon releasing a switch, an obstacle tile moves back to its original spot.
If I select a spot as destination and start pathfinding, upon releasing the switch that I'm pressing, the obstacle returns to its original spot but the player will walk through it. I've not been able to solve this with regenerate obstacle map. Has anyone come across an issue like this or does anyone have a quick way of solving it?
If it's not entirely clear what I want is for the player to detect that the obstacle tile has returned to its original spot and therefore block the player as he moves into it.