Converted Sensitivity to GlobalSettings variable
This commit is contained in:
@ -7,14 +7,14 @@ var max_angle_radians = 1.5
|
||||
|
||||
func _process(delta):
|
||||
var look_velocity = Input.get_vector("look_left", "look_right", "look_up", "look_down")
|
||||
var rotate_degree = -look_velocity.y * vertical_joystick_sensitity
|
||||
var rotate_degree = -look_velocity.y * GlobalSettings.Joystick_Sensitivity
|
||||
rotate_x(rotate_degree)
|
||||
|
||||
|
||||
func _unhandled_input(event):
|
||||
if event is InputEventMouseMotion:
|
||||
var mouse_movement = -event.relative.y
|
||||
var rotate_amount = mouse_movement * vertical_mouse_sensitivity
|
||||
var rotate_amount = mouse_movement * GlobalSettings.Mouse_Sensitivity
|
||||
var rotation_after = rotate_amount + rotation.x
|
||||
if rotation_after <= max_angle_radians and rotate_amount > 0:
|
||||
rotate_x(rotate_amount)
|
||||
|
||||
@ -63,7 +63,7 @@ func _physics_process(delta):
|
||||
move_and_slide()
|
||||
|
||||
var look_velocity = Input.get_vector("look_left", "look_right", "look_up", "look_down")
|
||||
rotate_y(-look_velocity.x * joystick_sensitity * delta)
|
||||
rotate_y(-look_velocity.x * GlobalSettings.Joystick_Sensitivity * delta)
|
||||
|
||||
func _process(delta):
|
||||
#Calculations for seeing if you vaped too many times within a short span
|
||||
@ -79,7 +79,7 @@ func _input(event):
|
||||
respawn()
|
||||
if not is_paused:
|
||||
if event is InputEventMouseMotion:
|
||||
rotate_y(-event.relative.x * mouse_sensitivity)
|
||||
rotate_y(-event.relative.x * GlobalSettings.Mouse_Sensitivity)
|
||||
|
||||
if event.is_action_pressed("vape"):
|
||||
if current_condition == CONDITION.NORMAL:
|
||||
|
||||
Reference in New Issue
Block a user