- Home /
Waypoint movement
Hi, I've recently followed this online tutorial (http://www.trickyfast.com/2017/09/21/building-a-waypoint-pathing-system-in-unity/) for waypoint movement and it works wonderfully except for when you click elsewhere before the path has completed. For example, If i have A, B and C nodes (A connected to B and B connected to C), If the player starts at A and clicks near C, they move to C through B, however if I were to click back on A (After the player has just left B), the player doesn't go back through B, they just go straight to node A. I'm not sure why. Any help is appreciated. Thanks
Answer by YetAnotherKen · Sep 09, 2019 at 07:41 PM
The problem is in the script somewhere. Look at how it responds when someone clicks on a new destination while it is navigating a preset path.
Hi, thanks for the fast response. When I click elsewhere it ignores the node it's just gone through, but the logic of the script shows that the node should have been added onto this new path regardless of the prior path. So I'm not sure why it's not working. Really got me stumped
How would I get it to print out the node path to the console? To see if it is ignoring it entirely. Though I'm not sure where to go from there either.