I am workng on a npc walk script.
In the game, there are breakable obsticles. By breaking them, npcs can walk through that spot.
I am using the combinateion of path and pathfinding weights to determine wether if its faster to break the obsticle ( which take time ) or to just go aroud it.
The problem Im having is that the path generated is sometimes nowhere near the closes path!
I didn’t know where to ask this quetion, but I am fairly certain this isn’t a scripting eroor.
Here is my code. I qulled out all the parts that were involved in the pathfinging