Hello!
I'm trying to fix this weird bug in my game and I'm having no luck so far.
In this game, holding down the Left shoulder gamepad button and moving Left or Right sets your max speed to 300. Normally the value is 200. It also lowers your acceleration and deceleration making the player harder to control, like playing Luigi in Super Mario Bros.
When the player's speed reaches its maximum point, it sets the Player's Jump Strength to 500 (Normally it's 465) enabling the player to jump higher(This is just for information, it's irrelevant to the problem).
When the shoulder button is released, a function is called that sets the Player's acceleration and Jump Strength to normal.
However, I wanted the Player's Max Speed and Deceleration to smoothly transition from the "Running" value to the "Normal" value.
I tried an event with Every Tick and lerping the Player's Max Speed if the button is not down and the Player's Speed is greater than 200 and it seemed to work at first.
But, to make this work, I had to disable it when the Player is jumping or falling because it caused other problems.
That however, makes it possible to stop pressing the shoulder button and keep jumping to retain speed even when the button is not pressed.
I think the fact that jumping de facto increases the Platform Speed is the core of the problem.
I've tried many other ways but each one produced its own problems...
Well, I hope I did an adequate job of explaining this, haha...
Please ask me if anything is unclear.
I can't think of any other way to fix this... I'd be grateful for any ideas...