How to change character max walk speed GRADUALLY?

Hi there,
I’ve setup my script to change my character’s max walk speed when shift is pressed, and return it on release. But I feel like the character is switching between the two too quickly. I’m still very new to unreal and blueprints and I’m coming from Unity, so I can probably do it using C++ scripting by manually interpolating between the two values, but I’d like to know if there is a way to do it using blueprints which would prove simpler. I still haven’t explored the C++ scripting part of unreal engine.

Thanks in advance!

1 Like

the first thing that pops to mind for me would be to use a timeline which allows you to blend between two values over a given time via a curve. you could also use the interps built into blueprint.

Here you go. In the timeline add a float track and create 2 keys, the first at 0 seconds and value of 0, the second at “X” seconds however long you want to take to reach “Max Speed” and value of 1. Then hook everything up as I have below. You need to create 2 new variables, “default max speed” and “New max speed”

1 Like

haha @ThompsonN13…I was working on this while you were answering I guess because you beat me to it, there were no answers when I hit submit

Thanks! You both guided me in the correct direction, I’ll checkout the timeline feature and interps.

Great help thanks! I’ll checkout the timeline feature right away.

Haha the same thing happens to me all the time. I would have made an example but i dont have unreal open right now