Path finding not restarting

Hi guys just finished this part and my enemies walk to each waypoint fine but when the get to the end of the waypoints they just stay there. Their “current waypoint index” variable doesn’t seem to reset back to 0 just stays at 3. I have 4 waypoints in my patrol path.
please help?

Solved.

Turns out my last waypoints y axis position was not within the tolerance I had set.

This took a while to figure out but thanks to these course and persistence I got it. Using the print() in all different methods to figure it out was extremely helpful. That might sound like a stupid statement but as a noob I didn’t understand till now how valuable and helpful it can be

1 Like

To me, those print statements (I actually use Debug.Log()) are the best way to debug my way out of almost any pickle. It’s the first thing I recommend for most problems. Good job working this one out!

1 Like

any reason why?

Thank you! This solved my problem as well… luckily I had set that up with a range slider so when I saw that suggestion I slid the tolerance up and bam… patrolling again…

1 Like

Personal preference and consistency. For more severe issues, I’ll use LogWarning or LogError to make a log stick out. Then when I want to kill logs, all I have to do is look for Debug.Log and I’ll find any of the variants.

This topic was automatically closed after 14 days. New replies are no longer allowed.

Privacy & Terms