add ability to move camera slower on controller
This commit is contained in:
@@ -99,20 +99,24 @@ func _process_controller_rotating(delta: float) -> void:
|
||||
)
|
||||
)
|
||||
|
||||
var look_slow: float = 0.25 if Input.is_action_pressed("look_slow") else 1.0
|
||||
|
||||
rotate_y(
|
||||
(
|
||||
-controller_raw_input.x
|
||||
* deg_to_rad(Settings.controller_sensitivity_horizontal)
|
||||
* look_slow
|
||||
* delta
|
||||
* (-1 if Settings.invert_controller_horizontal else 1)
|
||||
* (-1.0 if Settings.invert_controller_horizontal else 1.0)
|
||||
)
|
||||
)
|
||||
_camera.rotate_x(
|
||||
(
|
||||
-controller_raw_input.y
|
||||
* deg_to_rad(Settings.controller_sensitivity_vertical)
|
||||
* look_slow
|
||||
* delta
|
||||
* (-1 if Settings.invert_controller_vertical else 1)
|
||||
* (-1.0 if Settings.invert_controller_vertical else 1.0)
|
||||
)
|
||||
)
|
||||
_camera.rotation.x = clampf(_camera.rotation.x, PI / -2, PI / 2)
|
||||
|
||||
Reference in New Issue
Block a user