men11
Junior vMember
Posts: 25
|
Post by men11 on May 9, 2020 17:25:47 GMT
Hello, I have couple of AI with FSM Wander script because the terrain is not flat I frequently find AI stuck at some point without any collider or whatsoever, Just cant reach the point and wont quit trying. Is there is a way to fix that ? Decision script: like if he got stuck after ( X time) he should leave the FSM and go to the next maybe ? then i can just drop him back to the wander FSM Within the Wadner script:while moving can I count how long it take for him to do so without laggin the game too much and if he exceeded this amount I force him to change to a new movePoint ?
|
|
men11
Junior vMember
Posts: 25
|
Post by men11 on May 10, 2020 19:03:33 GMT
So I need to create a limited area around the AI to choose NAVmesh points on it and there are plenty of ways and methods to do that but all of them requires the spawn position as it defines the spawn position as the center of the sphere around the AI that is allowed to choose random waypoints within.
I'm not very good with C# but so far I've been able to make a small modification to record the "first_Position" of the AI once it enters this state.
but I'm using "1" spawner for multiple prefabs .... for some reason, all of them had the same coordinates of "first_Position" even tho I had multiple spawn points
this is how I did it (( I still don't know how the FSM AI Script works but that is my own way around it))
bool checker = true; if (checker) { // to make sure that this only run one time only first_Position = fsmBehaviour.aiController.transform.position; checker = false; }
Invector team could u help me understand why is this happening.
|
|