Incorrect movements during stop

Hello

I bought the pro version yesterday and completed the installation, everything works great. However, the moment the AI reaches the target position, the AI absurdly rotates to stop. For example, I come to position a, it turns left and right instead of stopping in the rotation it came from and then stops.

Here’s how you can see the problem I’m talking about.

In the scene Example6_Navmesh_RichAI set the RichAI script “SlowdownTime” to 0 and set “Slow When Not Facing Target” to false. AI will make movements where it stops.

The reason I set it to 0 is because I want it to stop suddenly, I don’t want it to stop gradually.
Thanks.

Maybe instead of setting SlowdownTime to 0, try setting RichAI.acceleration to 10000 or so. This will make stopping instant. Unfortunately it will also make starting movement instant too, so if you don’t want that, you have to reset acceleration back to a lower value after the complete stop.

I can say that I got a much better result by changing the RichAI settings a bit, thanks.

In the meantime, I will ask one more short question. In a scene with 500 npc, Unity AI system will consume less cpu or will it be RichAI system? I would be very happy if you could give a hint on this. According to the answer I will definitely use richAI for players, but for npc I may stay on Unity AI.

I never did performance comparisons. I recommend that you create a new topic for each new question, to get more relevant answers.

Hi

I think the best way is to try it. Unity’s agent has the benefit of being implemented in C++, so it’s likely to be faster. The RichAI is very general though. It’s quite possible you can make your own copy of that script and remove everything you don’t need.