Rect grid where NPC movement with pathfinding. Left mouse button click to toggle walkable, non-walkable cells and right mouse button click to set destination. This time around, the NPC will find the correct path and reach the target.
See the complete tutorial on https://faramira.com/2d-grid-based-pa...