RichAI states "delayed"

I’m not quite sure how to describe this, but I’m doing some experiments with AI and I’m using Astar Pro (with the RichAI) for pathfinding. I’ve created a really simple setup to describe the issue I’m having: I have a script that checks the RichAI’s velocity field every frame on update, and if it’s greater than a very small epsilon value, the model plays the “walk” animation.

mov

As you can see in the gif, there’s a huge multi-second delay between starting and stopping the walking animation. (I’ve also tried setting the transition times on the animation states to zero and adjusting the epsilon value just to be sure; same problem occurs).

The same issue occurs when I try to use desiredVelocity too. I’ve encountered this issue on both 2019.2.11f1 and 2018.4.12f1 LTS. I’m using the latest stable version of A* (4.2.8). Running on a 2015 i7 MacBook Pro.

I’ve also encountered a weird issue where setting the destination Vector3 of the RichAI does not seem to change the destination - but only under certain AI states. It seems to get “stuck” on a previously set destination. I’m not sure if this is related. Am I just using RichAI wrong or?

Hi

The velocity of the agent goes to zero over a period of time. If your threshold is set too low it might pick up movement which is only in millimeters per second (which is pretty much nothing). Also you will have to take into account that the animation takes some time to blend to the idle state. Make sure that your animation does not have an “Exit Time” set in mecanim as that can lead to large delays in transitions.

Ah, Has Exit Time was the ticket. Cheers! Still not sure about the issue of destinations getting “stuck” but if I run into that issue with the 2018 LTS release I’ll create an example of it.

1 Like