Improved lerp interpolation

This commit is contained in:
2024-02-16 12:51:05 +01:00
parent 2a53a731db
commit a374acc4f0
6 changed files with 16 additions and 6 deletions

View File

@ -12,7 +12,7 @@ func _ready():
owner.controller.direction_changed.connect(on_direction_changed)
func _process(delta):
root.rotation.y = lerp_angle(root.rotation.y, angle, rotation_speed * delta)
root.rotation.y = Math.damp_angle(root.rotation.y, angle, rotation_speed * delta)
func on_direction_changed(new_direction: Vector3):
direction = new_direction