Godot Version
Godot v4.6.1 Stable
Question
I’ve made a pause menu in my game that works just fine, but Ive noticed that the player’s animations still continue while the game is paused. I have already ensured that the process of both the player node and the AnimatedSprite2D is set to pausable and that the game actually pauses with the code given below of the pause menu autoload:
func _process(_delta: float) -> void:
if get_tree().paused:
show()
else:
hide()
if Input.is_action_just_pressed("pause") and get_tree().paused:
await get_tree().create_timer(0.1).timeout
get_tree().paused = false
elif Input.is_action_just_pressed("pause"):
await get_tree().create_timer(0.1).timeout
get_tree().paused = true
Is there anything I’m missing?