feat: implement movement state machine, FPS camera rig, and test level builder scaffolding

This commit is contained in:
DottsGit
2026-06-04 00:29:19 -04:00
parent da277e9d35
commit 0fd921481b
3 changed files with 20 additions and 13 deletions
+4 -1
View File
@@ -65,7 +65,10 @@ func _process(delta: float) -> void:
camera.fov = lerpf(camera.fov, _target_fov, 1.0 - exp(-params.fov_lerp_speed * delta))
# ── Head bob ──────────────────────────────────────────────────────────
if player.is_on_floor() and hspeed > 1.0:
var sm = player.get_node_or_null("MovementStateMachine")
var is_sliding = sm and sm.current_state == "slide"
if player.is_on_floor() and hspeed > 1.0 and not is_sliding:
_bob_timer += delta * params.head_bob_frequency * (hspeed / params.walk_speed)
var bob_y := sin(_bob_timer) * params.head_bob_amplitude
var bob_x := cos(_bob_timer * 0.5) * params.head_bob_amplitude * 0.5