Ai Character Spins Randomly At Waypoints Patrolling

KO_Games

Member
I'm using Behaviour Designer and the opsive 3rd person controller. I'm trying to do a simple behaviour tree where the chicken ai just patrols 4 points. However, each time the chicken arrives at a waypoint it starts to spin. I tried increasing the arrived Distance under Na Mesh Agent Movement ability, increasing the stopping distance on the nav mesh agent, and increasing the arrival distance on the behavior tree patrol action. None of these helped. I noticed that if I change the angular speed on the nav mesh agent component and on the behavior tree that it would speed up and slow down the chicken rotation...but it didn't solve the issue. I'm stuck at the moment and not sure what else to check out.

Here is what happens with an angular speed of 10.
Here is what happens with an angular speed of 9999.
Here are my settings:

screenshot 1 rotations settings.png

screenshot 2 rotations settings.png
 
This looks similar to this post:


If you can repro it from that attached scene I should have a better idea of the cause.
 
Thanks Justin for your help! I was able to reproduce it in the scene, but that led me to figure out what was causing the issue. It was because I had auto braking unchecked on the nav mesh agent component. The Unity docs mention this can cause that spinning: https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent-autoBraking.html

I also changed my angular rotation numbers to match the ones from the repo scene and now it seems to all be working well. If anything else comes up I'll let you know. Thanks again for your help!
 
Top