|
Post by thegreatest95 on Jan 5, 2017 4:23:57 GMT
I don't know why the AI does this? Sometimes when my player moves the AI just decides to run straight ahead to the edge of the navmash and just keep running in that direction endlessly. His state is Chase, so I'm not sure what he's chasing... cause it certainly isn't the player. And the problem isn't fixed by turning his field of view to 180 either.
|
|
|
Post by Invector on Jan 5, 2017 12:17:23 GMT
Let's start with the basic lol did you bake the navmesh?
|
|
|
Post by thegreatest95 on Jan 5, 2017 20:52:19 GMT
Let's start with the basic lol did you bake the navmesh? Yep. And their collider is correct. They work as they should except for the random times when they start doing this.
|
|
|
Post by Chronicman on Jan 5, 2017 22:19:07 GMT
Does he have a pathArea hes trying to follow ? Hes he always trying to get to the same location or does it change ?
|
|
|
Post by Invector on Jan 5, 2017 23:47:36 GMT
Did you use this fix from another thread? - I experienced some strange behaviour before the fix
Cause > If the character has a Capsule Collider higher then 2, the raycast will not find the ground and he will keep floating.
|
|
|
Post by thegreatest95 on Jan 6, 2017 0:43:55 GMT
Did you use this fix from another thread? - I experienced some strange behaviour before the fix Cause > If the character has a Capsule Collider higher then 2, the raycast will not find the ground and he will keep floating. No I haven't used that fix... because he doesn't float... but since you're asking... Added that change and didn't fix the problem.
|
|
|
Post by thegreatest95 on Jan 6, 2017 0:45:02 GMT
Does he have a pathArea hes trying to follow ? Hes he always trying to get to the same location or does it change ? Uh he does have a pathArea... but it's pretty irrelevant as he only uses it for about a second before he sees the Player right in front of him.
|
|
|
Post by thegreatest95 on Jan 6, 2017 0:48:49 GMT
Here's another gif that might make it more clear what is happening? He has 180-degree view, so he can see behind him... and changing the Distance To Lost Target doesn't seem to fix it either...
|
|
|
Post by Chronicman on Jan 6, 2017 0:51:34 GMT
I think that is your problem, your going behind him and hes losing track of you and going to his way point. Try taking off the way point and see if it still happens.
|
|
|
Post by thegreatest95 on Jan 6, 2017 0:52:54 GMT
I think that is your problem, your going behind him and hes losing track of you and going to his way point. Try taking off the way point and see if it still happens. He has no waypoint over there. Also this problem was happening before I gave him a pathArea. His state when running against the edge of the navmesh is "Chase" also, not any of the waypoint things.
|
|
|
Post by Chronicman on Jan 6, 2017 1:01:24 GMT
Well that's just odd, check his sensor how many targets does it have ?
|
|
|
Post by thegreatest95 on Jan 6, 2017 1:06:17 GMT
Well that's just odd, check his sensor how many targets does it have ? Hm yea, it does seem once he starts his run towards the edge that his sensor loses the player. But once the player re-enters the sphere's detection, he doesn't stop running against the edge. ---- Once the sphere loses detection, shouldn't he return to patrolling waypoints instead of just running endlessly in the last direction?
|
|
|
Post by Chronicman on Jan 6, 2017 1:10:54 GMT
You are correct sir, it should start patrolling again. Try debug his target / destination see what that comes up with.
|
|
|
Post by thegreatest95 on Jan 6, 2017 1:18:56 GMT
You are correct sir, it should start patrolling again. Try debug his target / destination see what that comes up with. Yep. Even weirder, even without the player in his sphere, while he's running against the edge his destination is the player.
|
|
|
Post by Chronicman on Jan 6, 2017 1:21:05 GMT
Something must not be getting cleared when the player leaves the sphere.
|
|