Improved performance

This commit is contained in:
2024-02-26 23:50:56 +01:00
parent afab83a35f
commit 885459f5d3
12 changed files with 45 additions and 13 deletions

View File

@ -12,6 +12,9 @@ func _ready():
(owner as Character).controlled.connect(on_controlled)
func _process(delta):
if absf(angle_difference(root.rotation.y, angle)) < 0.001:
return
root.rotation.y = Math.damp_angle(root.rotation.y, angle, rotation_speed * delta)
func on_controlled(controller: Controller):