RichAI endReachedDistance has no effect

Hi,

I’m using Recast Graph. The agent is using RichAI. I’m trying to implement an agent to follow me (the character I’m controlling). I set endReachedDistance in the editor to some values but it appears that the agent is not respecting them. The agent is trying to collide with my character to reach the target point but it never reaches which causes him to push the character with velocity not reaching to zero.

I’m using the latest version 4.2.15. I want the agent to respect the distance value set in endReachedDistance and his velocity should be set to zero once he reached endReachedDistance.

Of course I can create an empty GameObject behind my character and let it to be the target. But I don’t want to do this workaround.

Your help is highly appreciated.
Thanks.

Well, I have followed the fix in the following page and it worked:
[SOLVED] Question about slowdownTime and endReachedDistance - Support Forum (arongranberg.com)

But could this behavior be done without hacking the code?

Hi

Have you set the RichAI’s whenCloseToDestination field to ‘Stop’?
See https://arongranberg.com/astar/docs/aipath.html#whenCloseToDestination

But yes, even with that set the agent will start to slow down when it comes within that radius. It will not be zero when it reaches that distance. For that you will have to make the code change from the other post I’m afraid.