Quote:
I guess that's why I'm confused, I don't know how best to do this. I'm detecting that point to click (ScreenToWorldPoint) Input.mousePosition.
This is the only code I have tried that has worked for me to get him to walk to point of click.
No, not "how does you code know where that point is" - if you could answer that you wouldn't have to ask the question! :laugh:
How do you know? If I tell you "go to 14, Treacle Mine Road" and you set off on foot, how do you know you got there?
Well, basically you compare your current position with the required destination and when the difference is zero (or very small) you have "arrived". Translate that into a grid, and you are on cell (4, 2) and 14 Treacle Mine Road is on cell (16, 7). Are you there? No - because 4 isn't the same as 16, and 2 isn't the same as 7. So you walk in "an approved direction" (up, down, left right, maybe diagonals) by modifying your current cell address until you arrive. If 16 - 4 is bigger than 7 - 2, add one to your X to move to (5, 2), otherwise add one to your Y and move to cell (4, 3). Check again. Move if you aren't there.
Does that make any sense?