Very helpful, but if we get only the Y-axis remainder, if you try to climb too steep slope (like 5-10 degrees), you will be able to climb it, even be pushed in the air.
Actually, the problem doesn't come from the Y-axis remainder, but the parameter floor_max_angle doesn't seem to work correctly in the function move_and_slide_with_snap and move_and_slide