fix: fov now linearly increases with speed and first person weapon view no longer clips through walls
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user