AI disregards braking friction and deceleration

I’m trying to build a pseudo-vehicle AI using the character blueprint as a base.

In my Behaviour Tree, I am using the MoveToActorOrLocation node to try and have the AI “drive” (walk) to a point and then once their either decelerate on approach or roll over the target when there is no input.

The intuitive thing for me to do was change several variables in the Character Movement Component:

  • Braking Friction/Factor reduced
  • UseSeparateBrakingFriction = true
  • Braking Deceleration Walking reduced

Despite these actions, when the AI uses AIMoveTo or MoveToActorLocation and reaches its target, it comes to an abrupt stop, even with StopOnOverlap set to false/no.

I’ve done a little googling around and apparently a bool in the PathFollowingComponent forces AIs to stop movement when they reach a target, I edited the C++ file but I’m still getting the same results.


Is there a workaround I can use that’d be simpler than getting the distance between the AI and its target and Lerping its max walking speed between the current max speed and 0? As my target is moving and I’d rather have a coasting AI that then speeds up again when it’s lagged behind its target.

I worked around this idea entirely by creating a wheeled vehicle that only had a couple of gears, I used a behaviour tree to dictate throttle input based on distance, as well as steering input in relation to angle.
As the wheeled vehicle does not use the NavMesh, I do a line trace either side of the vehicle every few moments to see if there’s an obstacle, and then override the steering/throttle defined by the goal with a steering/throttle option that’ll make the AI avoid the obstacle, including other AI.

Marked as Answer for tracking purposes too.