This commit is contained in:
Nicholas Butzke
2026-08-02 02:20:02 -04:00
parent 61669627db
commit 922983429e
226 changed files with 34032 additions and 18521 deletions
+4
View File
@@ -27,6 +27,8 @@ func enter(_data: Dictionary = {}) -> void:
machine.player.wallrun_player.play()
var hvel := Vector3(machine.player.velocity.x, 0.0, machine.player.velocity.z)
if machine.player.has_method("update_wallrun_audio"):
machine.player.update_wallrun_audio(hvel.length(), machine.wall_normal)
_current_tangent = machine.wall_normal.cross(Vector3.UP).normalized()
if hvel.dot(_current_tangent) < 0.0:
_current_tangent = -_current_tangent
@@ -71,6 +73,8 @@ func update(delta: float) -> void:
var hvel := Vector3(vel.x, 0.0, vel.z)
var along := hvel.dot(wall_tangent)
if player.has_method("update_wallrun_audio"):
player.update_wallrun_audio(hvel.length(), machine.wall_normal)
var target_speed: float = maxf(machine.get_effective_speed(params.wall_run_speed), along)
along = move_toward(along, target_speed, params.wall_run_accel * delta)
# Redirect all horizontal velocity along the wall (kills the into-wall part)