Pawn Acceleration and Brake

Hi,

I’m new to UE4, I’m trying the make a pawn move around and increase in speed only when an acceleration action button is held? Any help?

Thanks

If you want to increase speed gradually, you can use a Timeline that changes Max Walk Speed.

Let’s say your default running speed is 400, and you want it to be 800 when fully accelerated. Make a Timeline with a curve that goes from 0 to 1 in, say, 1 second, use the curve as Alpha for a Lerp or an Ease node, and set A to 400 and B to 800.

Now when you press the acceleration key, play the Timeline (NOT From Start), and when you release the key, Reverse (NOT From End) the Timeline or whatever you need it to do.

1 Like