I want my player to move faster down slopes

Godot Version

4.7

Question

Hello! I’m working on a 2D platformer and I thought it would be fun if the player started moving faster while going down slopes and then they could use that momentum to cross larger gaps. I’m not super sure how to implement this feature though and I know slopes can be a headache. I figure I should use a raycast to check the surface the player is standing on, but from there I’m not sure what to do next. Should I even bother since slopes can be a hassle, or is this something that could be implemented without too much trouble?

You can use get_floor_angle to get the angle of the current floor, and modify your players speed based on that. (Granted if you use a CharacterBody2D, but you didn’t mention it so I will assume you do.)

Wow I’m an idiot. Thanks!

Don’t say that you are not an idiot on the forums, your a fello developer (even if you haven’t published a game.