Added ability to adjust mouse settings in game

This commit is contained in:
2024-08-09 01:23:47 -05:00
parent 028a04bff7
commit ef1af747ba
6 changed files with 94 additions and 31 deletions

View File

@ -50,7 +50,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 * GlobalSettings.Joystick_Sensitivity * delta)
rotate_y(-look_velocity.x * GlobalSettings.GetSetting(GlobalSettings.Setting.Joystick_Speed) * delta)
func _process(delta):
#Calculations for seeing if you vaped too many times within a short span
@ -72,7 +72,7 @@ func _input(event):
respawn()
if not is_paused:
if event is InputEventMouseMotion:
rotate_y(-event.relative.x * GlobalSettings.Mouse_Sensitivity)
rotate_y(-event.relative.x * GlobalSettings.GetSetting(GlobalSettings.Setting.Mouse_Speed))
if event.is_action_pressed("vape"):
if current_condition == CONDITION.NORMAL: