As the title says I’m trying to make my player stop moving at the node closest to an object I click on, in my case an enemy. I have everything set up properly for movement, but right now the player moves ontop of the target.
I found and added this little gem:
GraphNode node = AstarPath.active.GetNearest (transform.position).node;
But that returned an error. I took to the Unity forums and quickly found an answer:
Int3 a = new Int3 ();
Vector3 b = (Vector3)a;
Which actually originated from these forums. Now I have a very odd error where when I use this code my player always navigates to the original spawn point. Any ideas why this is?