wall running tweaks

This commit is contained in:
Derek
2025-02-19 08:42:11 -06:00
parent 1d75036a31
commit 6e6cbb95e3
2 changed files with 20 additions and 2 deletions

View File

@@ -306,10 +306,10 @@ func _physics_process(delta):
else:
velocity.x = lerp(velocity.x, direction.x * speed, delta * 6.5)
velocity.z = lerp(velocity.z, direction.z * speed, delta * 6.5)
## wall_run
## Wall Running
if wall_ray_1.is_colliding() or wall_ray_2.is_colliding():
if abs(Vector2(velocity.x,velocity.y)) >= Vector2(5.0,5.0):
velocity.y = clamp(velocity.y,-2,abs(velocity.y))
velocity.y = clamp(velocity.y,-1,abs(velocity.y))
#velocity.x += -velocity.x * .01 * delta
#velocity.z += -velocity.z * .01 * delta