Let’s say we have a CharacterBody2D, moving it by setting velocity and calling move_and_slide(). When it encounters an angled wall that’s at a different angle than the input, it slows down by an amount depending on the angle.
How could I make it so that when it slides at a shallow angle (less than 45 degrees), it maintains its full speed (1000 in this case)? In the mockup below, I cheated by setting the Motion Mode to Floating, but this stops the body in it’s tracks when it exceeds the slide angle, while I want it to slow down at those steeper angles.
Why not just decrease the wall_min_slide_angle to 0.0? Then it will preserve the speed even on almost 90 degrees turn. It will stop only on exactly 90 degree slope, but that makes sense, because how should it know which way it should slide?
I still want the body to slow down by an amount once it exceeds a 45 degree angle, though it just occurred to me that I could do that myself in code, I’ll give it a try.