fix: scoping
This commit is contained in:
@@ -28,7 +28,8 @@ func _ready() -> void:
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
|
||||
var sens = SettingsManager.mouse_sensitivity
|
||||
var is_ads = camera and camera.fov < params.base_fov - 5.0
|
||||
var sens = SettingsManager.ads_sensitivity if is_ads else SettingsManager.mouse_sensitivity
|
||||
# Yaw: rotate the player (parent)
|
||||
get_parent().rotate_y(-event.relative.x * sens)
|
||||
# Pitch: rotate this pivot
|
||||
|
||||
Reference in New Issue
Block a user