For some reason, the pathfinding on my 2d game is not consistently working. The target, which is an empty game object, is correctly moved when I click, and the player always has this gameobject as its target.
Strangely, the player moves in the Z axis despite the target having a Z position of 0 (I noticed the player’s Z coordinate is based on where it is on the grid…??). I don’t know if this is related.
Why does it not calculate the path every time? This is frustrating.