Acceleration and deceleration

I want to make character which smoothly starting running and smoothly stopping to idle.
In first case I set “Max acceleration” to 1000 and it works good but when I try set “Braking deceleration” to any value it seems to have always same behavior for every value (1 or 1000 it doesn’t matter). My character always immediately stop…

Have you any idea what I’m doing wrong?

1 Like

Hey ,

There are two factors in play when there is no acceleration for your character: Ground Friction and Braking Deceleration Walking. default value for Friction is 8.0, which is quite high, so that is stopping your character quickly. Friction is relative to velocity, and Deceleration is applied constantly over time. Most likely Friction is dominating Deceleration.

Try lowering Ground Friction value in Character Movement component to 1.0 or 2.0, and then play with Braking Deceleration Walking value.

Hope that helps!

Also, try setting “Use Separate Braking” variable to true in “Character Movement” component. And then set “Braking Factor” (or similar name) low, to like 0.1 or something. This will cause character to gradually lose speed when you’re running and then release input.

It’s safer this way than setting friction low because that will cause character to slide around all time.

Hope this helps!

2 Likes

For me. MaxWalkSpeed=125, GroundFriction=0.75, Deceleration=128, Acceleration=128 gives me a somewhat believable movement, of course those are matched to my animations to avoid skating across floor.

For character acceleration, better value (Max Acceleration) for example 300

To slow down a character, it’s better to change two values (1.Braking Deceleration walking for example “300” and 2. Braking Friction Factor for example “0”)

You can try playing with input itself. Use a targetinput vector variable to store what player input is, and if it’s bigger than current then override, if shorter (vector length) then use vinterp or something to smoothly get closer and closer.

I’m currently fighting built-in movement component myself, I need stopping distance but sort of not quite there yet. So much so that I wrote my own movement component which works for most part (capsule trace returning locations that will be initial overlaps if I move there hurts though).

Anyways, if it’s for this much then it’s probably going to work one way or another.

Hello. This is late but to have gradual deacceleration, go to movement component details pane, just under “Character movement(general settings)”, there is “character movement (walking settings)”, you need to adjust “braking deacceleration walking” parameter. Hope it helps others as well.

Hi everybody ! I want to warn that if you use an AIController, you need to check “Use Acceleration for Paths” in the path tracing section in the Blueprint and then every modified parameters about acceleration and decerelation will take effect.