Post #67: Pausing the Scene Tree
Today I continued through the tutorial more. One thing I learned about is how you can pause the entire scene tree:
get_tree().paused = true
Some notes and links to the docs...
- The
get_tree()function is defined here, on theNodeclass - The above function returns a
SceneTree(link) - On the
SceneTree, you can set the member valuepausedtotrue(link) - This has the side effects mentioned in the docs, which are the following:
- 2D and 3D physics will be stopped, as well as collision detection and related signals.
- Depending on each node's
Node.process_mode, theirNode._process(),Node._physics_process()andNode._input()callback methods may not called anymore.