Hey so I can't figure out what will the timer be to set the camera smoothing speed into default, like for example i died because of a spike or void, my code will set the position of the kinematic body into my spawn point but I don't know what the timer of my yield would be. so are there any way to determine the time?
The Problem Video
func _on_Area2D_body_entered(body):
if body.name == 'Player':
is_alive = false
anim.play("Death")
yield(get_tree().create_timer(2.3),"timeout"); cam.smoothing_speed = 2
position.x = -168
position.y = -9
is_alive = true
yield(get_tree().create_timer(?????????????),"timeout")
cam.smoothing_speed = 5