I am working on a character controller that can switch between sprinting and walking and I tried to implement a change in speed when holding down shift. I thought it would be simple to implement, just changing the value while shift is held down and putting it back when the key is released, but this caused the character to have extremely jerky motion while the speed was increased. The character I am making is custom and I still had the default third person character in the project, so I tried implementing it there to see if it was a weird effect of my own blueprint code, but the same effect occurred. After that, I did research to see if there would be an alternative way to implement a speed change, but I kept coming up with the same method that I used. Has anyone else experienced this? Is there something I can do to fix it or work around it?
Here is a link to a screen recording of the jitter effect. Moments of smooth motion are with the shift key released and moments of jitter are with the shift key pressed: SprintJitter.mkv - Google Drive