I am using pathfinding behavior in tower defense game whenever I add a blocking object such as wall, the monster rotate around itself, sometimes just move in their place and doesn't move.
In the link is the code for the pathfinding that I am doing, if you notice anything wrong or not efficient, please post anything may help
drive.google.com/open ... EpWYVUtVjA
NB. In the third image what I am trying to do is when monsters fail to find path destroy the last wall, also what I am trying to do is when I add wall Regenerate pathfinding map.