tweak slope physics

This commit is contained in:
2025-08-22 23:07:45 +10:00
parent 9fc68675fb
commit 5917b542e7

View File

@@ -85,7 +85,10 @@ static func process_collision(
if hit_floor and not hit_slope and not hit_wall and not hit_ceiling:
new_velocity = Vector2.ZERO
if hit_slope:
new_velocity.x = new_velocity.y * signf(floor_angle)
new_velocity = (
new_velocity.slide(Vector2.UP.rotated(floor_angle))
* wall_bounce_velocity_loss
)
if hit_ceiling:
new_velocity.y = 0
if hit_wall: