start using input instead of unhandled input for player, reducing jitter strength
This commit is contained in:
parent
229b686ca9
commit
c31778b314
|
|
@ -38,8 +38,8 @@ var has_focus: bool = false:
|
|||
@export var camera_jitter_speed:float = 3
|
||||
@export var angular_jitter:Vector3 = Vector3(0.1, 0, 0.05)
|
||||
@export var angular_jitter_speed:Vector3 = Vector3(2, 1, 1)
|
||||
@export var location_jitter:Vector3 = Vector3(0.1, 0.1, 0.1)
|
||||
@export var location_jitter_speed:Vector3 = Vector3(3, 0.3, 1)
|
||||
@export var location_jitter:Vector3 = Vector3(0.05, 0.05, 0.05)
|
||||
@export var location_jitter_speed:Vector3 = Vector3(2, 0.3, 1)
|
||||
var jitter_strength: float = 0
|
||||
|
||||
var loc_noise_spot: Vector3 = Vector3.ZERO
|
||||
|
|
@ -143,7 +143,7 @@ func _handle_mouse_input(event:InputEventMouseMotion):
|
|||
if event.relative.length() < mouse_jerk_rejection:
|
||||
current_mouse_rotation = event.relative
|
||||
|
||||
func _unhandled_input(event:InputEvent):
|
||||
func _input(event:InputEvent):
|
||||
if has_focus:
|
||||
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
|
||||
_handle_mouse_input(event)
|
||||
|
|
|
|||
Loading…
Reference in New Issue