Improved lerp interpolation
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user