Ending on the center of the last node

So… I just started movement in my srpg game… My character follows the path well, and it gets to the last node, but right before it gets to the last node he stops the distance from the way point.

http://pastebin.com/WRi15pGm

and on the seeker I tried all the different end modifiers and they all did the same thing.
so if there is a way to end on that final node a different way, or a way of editing my code where the end node modifier works… that would be great.

Hi

Likely this is the movement script. Which movement script are you using? A custom one or one of the included scripts?

a pieced together script made from the example AstarAI. Instead of the AI traveling to a vector3, I have the AI traveling to a node my mouse clicked on… I’m getting the nodes data from a graphical grid that is on top of your grid. I tried with and without the bools that I have in place before the movement takes place in the script… but it did not seem to make much of a difference.

Hi

I think this line is causing the problems that you are having

if (Vector3.Distance (transform.position,path.vectorPath[currentWaypoint]) < (nextWaypointDistance - 1)) {

If it is closer than nextWaypointDistance - 1 (not sure why you have -1 there, but oh well) to the end point of the path, the waypoint index will be incremented and the character will think it has reached the end of the path but will not do any effort to move closer to the end point.

it does not stop in middle of the last node though. it stops on the line right before the next node, the exact distance of the way point search.

I’m not quite sure what you meant, but note that in the scene view what you can see are the connections between nodes, not the node outlines.