feat: implement movement state machine, FPS camera rig, and test level builder scaffolding
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user