tweak slope physics
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user