Improved animation performance
This commit is contained in:
@ -17,6 +17,9 @@ func _ready():
|
||||
character.controlled.connect(on_controlled)
|
||||
|
||||
func _process(delta: float):
|
||||
if (physics_position - character.position).length_squared() < 0.00001:
|
||||
return
|
||||
|
||||
character.position = Math.damp_vector(character.position, physics_position, ticks_per_second * delta)
|
||||
|
||||
func _physics_process(delta: float):
|
||||
|
Reference in New Issue
Block a user