move aiming processing to physics process to fix jitter

This commit is contained in:
2025-07-27 05:10:58 +10:00
parent f36113d64c
commit aef30cbd88
6 changed files with 131 additions and 124 deletions

View File

@@ -13,11 +13,11 @@ extends Camera3D
@export_group("Damage shake")
@export var _damage_shake_duration: float = 0.5
@export_exp_easing var _damage_shake_ease: float = 2
@export var _damage_shake_amplitude: float = 0.02
@export var _damage_shake_amplitude: float = 0.1
@export var _damage_shake_frequency: float = 50
@export_group("Hit shake")
@export var _hit_shake_fov: float = 0.5
@export var _hit_shake_fov: float = 1
@export var _hit_shake_duration: float = 0.5
@export_exp_easing var _hit_shake_ease: float = 4
@@ -40,6 +40,9 @@ func _process(delta: float) -> void:
fov = _fov
_damage_shake(delta)
_hit_shake(delta)
func _physics_process(delta: float) -> void:
call_deferred("_process_following", delta)