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