- var floor_normal = player.get_floor_normal()
- var ground_slope_input = (PI / 2) - player.velocity.angle_to(floor_normal)
- player.velocity = player.velocity.move_toward(
- move_direction * (player.walk_speed + ground_slope_input * player.walk_speed),
+ player.floor_normal = player.get_floor_normal()
+ player.ground_slope_input = (PI / 2) - player.velocity.angle_to(player.floor_normal)
+ var new_velocity = player.velocity.move_toward(
+ movement_direction * (player.walk_speed + player.ground_slope_input * player.walk_speed),