How do I get my guard(s) to stop at NavPoint(s) and go into IdleState in C#
I'm trying to get my NavAgent to stop when they enter a NavPoint area and go into the IdleState for x seconds, then continue moving until they encounter another NavPoint.
So far, they can go to the NavPoints, but do not stop. They change color, but that's based on a time and not once they reach/leave the NavPoint.
I tried using navAgent.Stop and navAgent.Resume, but I'm getting errors under them. Am I not using them right?
How do I make them enter the state once they enter the navPoint? Here is my NavAgent script: https://gist.github.com/anonymous/bf8dee9356823c34b100dc52e16978ff
Here is my script for the GuardStateMachine: https://gist.github.com/anonymous/acce725515cc9cf95f28ebaef7ac3881
Comment