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

@@ -27,7 +27,6 @@ func _ready() -> void:
func _process(_delta: float) -> void:
call_deferred("_aiming")
var aim_pos := global_position + aiming.aim_offset
Debugger.marker("aim", aim_pos + Vector3.UP)
@@ -35,6 +34,7 @@ func _process(_delta: float) -> void:
func _physics_process(delta: float) -> void:
_aiming()
var can_move := not attack.is_hitting()
velocity = movement.movement(velocity, delta, is_on_floor(), can_move)