fix: fov now linearly increases with speed and first person weapon view no longer clips through walls

This commit is contained in:
DottsGit
2026-06-06 11:16:50 -04:00
parent 10416a83a0
commit 909b25548c
2 changed files with 63 additions and 3 deletions
+3 -3
View File
@@ -56,9 +56,9 @@ func _process(delta: float) -> void:
_target_fov = params.base_fov
var hspeed := Vector2(player.velocity.x, player.velocity.z).length()
# Dash FOV (highest priority)
if hspeed > params.walk_speed * 1.5:
_target_fov = params.dash_fov
# Smoothly scale FOV based on speed above walking speed
var speed_factor = clampf((hspeed - params.walk_speed) / (params.walk_speed * 0.5), 0.0, 1.0)
_target_fov = lerpf(params.base_fov, params.dash_fov, speed_factor)
if _weapon_fov_override > 0.0:
_target_fov = _weapon_fov_override