So I have everything setup for a 2d game with this amazing pathfinding, right? Well I don’t have local avoidance because I’m poor =(
Anyway: my character sprites are on a layer that the gridgraph casts as unwalkable. So at the start the characters in this grid/tile based game are obstacles and the path finding moves around them. Awesome. Well when they move the graph doesn’t update and now they’re ghost! walk right through them!
Oh well I make a call to rescan
( GameObject.Find(“Astar”).GetComponent().Scan(); ) (might be a bit of a hack)
and then WHEEE the characters are unwalkable again!
So that’s awesome. It’s a turn based game so it’s okay so far.
Well the weird thing is when a character is on an unwalkable node it always “Exits” to the left (to get onto a path again (i see that i’m not on the grid when i’m on that unwalkable node).
Why is it that the left node is calculated as the nearest and is there a way to fix this?
Thanks!
-Xellinus Demitris Ruin