+1 vote
   if Input.is_action_just_pressed("pause"):
        if is_paused == false:
            $pause_popup.show()
            get_tree().paused = true
            $pause_popup.visible = true
            is_paused = true
        elif is_paused == true:
            $pause_popup.hide()
            $pause_popup.visible = false
            get_tree().paused = false
            is_paused = false

When using this, the game remains paused and I cannot close the popup menu. If I switch the order, the menu will open once and then never open again.

Godot version 4.10
in Engine by (13 points)

Pausing the scene tree stops the physics processing.

If true, the SceneTree is paused. Doing so will have the following behavior:

- 2D and 3D physics will be stopped. This includes signals and collision detection.

Popups are modal by default but I don't know if they stop the scene tree processing.
If they do then you needn't pause the scene tree.
If they don't they you will need to add a state machine to bypass processing while in the 'pause' state or something similar.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.