So I set up a smooth crouch thing which works fine. There’s just one thing I don’t understand and I hope one of you can point it out to me.
The part of the script I show screenshots of is where the Max Walk Speed is set. It is lerped between Max Crouch Speed and another variable.
This other variable is what I don’t understand - I have to set it up in “Event Begin Play” and set it to “Max Walk Speed” from the Movement Component, and then use this Variable (Real Move Speed) for the lerp.
Why does it not work if I put the “Max Walk Speed” from the Movement Component directly in the lerp?
They have to be both the same.
Is it because if I set the “Real Move Speed” to what “Max Walk Speed” is in the beginning of the game, the “Real Move Speed” will all the time stay at the same (lets say 100), so 100 will be used for the lerp, while if I put “Max Walk Speed” in the lerp, it will change to a lower value when crouching and then this will be used in the lerp? Because I stay slow after crouching if I put the “Max Walk Speed” in there.