For navmesh using AI pawns, I can’t seem to be able to get them to obey CharacterMovementComponent deceleration and breaking parameters. Movement obeys acceleration parameters (slowly speeds up), but comes to an abrupt stop at movement goal.
I’m using a move to location request on the owning ai controller.
I’ve tested with various combinations, with normal AIController class, DetourCrowdController class, with physical interactions on/off, with deceleration/breaking overrides on/off.
I’ve created a sample project that demonstrates the problem. It’s based off of TopDown sample.
To reproduce, open project, play in editor, and click on floor to issue move to request. Observe that AI obeys acceleration but not deceleration parameters.
From digging into code, I found that if you call SetStopMovementOnFinish(false) on the PathFollowingComponent, it will make the actor use acceleration to slow down, BUT, only after it has already reached it’s goal. So it will overshoot the goal.
I only partially tested this, so hopefully it will work for you.
I was able to simulate deceleration using a bit of math and adjusting the playing max walk speed as the player approached the target. I know this isn’t a true fix but it got the job done. I can dig up a screenshot if it’d be helpful.