feat: implement movement state machine ground/air states and initialize weapon manager system

This commit is contained in:
DottsGit
2026-06-10 22:37:17 -04:00
parent 3dc7fda622
commit 3c512870f2
3 changed files with 51 additions and 12 deletions
+8 -2
View File
@@ -204,8 +204,14 @@ func update(delta: float) -> void:
var wall_n := machine.detect_wall_horizontal()
if wall_n != Vector3.ZERO:
if not player.is_on_floor():
machine.switch_to("wall_run")
return
var w_look_dir := -player.global_transform.basis.z
var h_look := Vector3(w_look_dir.x, 0.0, w_look_dir.z).normalized()
# Require looking mostly along the wall (angle > 41 degrees from normal)
# and inputting mostly along the wall (angle > 31 degrees from normal, allows W+A/D diagonally into wall)
if absf(h_look.dot(wall_n)) < 0.75 and absf(wish_dir.dot(wall_n)) < 0.85:
machine.switch_to("wall_run")
return
# ── Dash ──────────────────────────────────────────────────────────────
if machine.input_dash: