I was trying to convert my shooter enemies to use RichAI with aiDestinationSetter but I get very weird behaviour when using large endReachedDistances.
Everything seems normal with endReachedDistance < 1.
At endReachedDistance 5, slowdownTime 0.5 the agent does NOT stop at 5, they drift to around 2.5, but RichAI.remainingDistance says it is ~5, which it is not. You can also see reachedDestination triggers on/off until the agent stops moving.
And if you go with a larger endReachedDistance the problem gets much worse.
The agent will almost stop, then start drifting some more, repeat that process until it eventually stops at around halfway under the endReachedDistance. eg. I set it to 15, but the agent doesn’t actually stop drifting until they are around 7 away, but RichAI still reports being 15 away which it isn’t.
You can see the richai.remainingDistance fluctuates wildly.
All I’m after is getting my agents to stop when they are 30m out from their target.
If I use my own checks in code it works fine, but in trying to use aiDestinationSetter I have to add extra code to stop the agent (like canMove = false) otherwise the agent will have this drift problem.