In an endless runner, how do you make the character speed constant?

I’m building a classic endless runner, but whenever I keep holding down the A or the D key (running along one of the walls) the character decelerates a lot. How do I make him not decelerate?

You will want to do a trace to your left and right to see if it hits a wall, if it does you want to break the hit then grab the normal. From here get the Rotation from X vector from that normal and if its your left -90 from the yaw rot, if its on the right +90 to the yaw rot. Plug this into your movement direction, this will make it so when you hit a wall it will say your direction is instead going forward not sideways.