You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/execution_order.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,13 @@ Roughly sketched, the order looks like this:
6
6
7
7
1.`SceneTree.physics_frame`
8
8
- Rope update
9
-
2.`_process()`
10
-
3.`_physics_process()`
9
+
2.`_physics_process()`
10
+
3.`_draw()` (if `queue_redraw()` was called in `_physics_process()`)
11
+
4.`_process()`
12
+
5.`_draw()` (if `queue_redraw()` was called in `_process()`)
11
13
12
-
This assumes that the FPS match the physics tickrate, which is usually locked at 60 FPS.
13
-
On a 144 Hz screen for example, it wouldn't match and you get more `_process()` frames than `_physics_process()` possibly making this lag even more noticable.
14
+
This assumes that the FPS match the physics tick rate, which is usually locked at 60 FPS.
15
+
On a 144 Hz screen for example, it wouldn't match, resulting in more `_process()` frames than `_physics_process()`.
14
16
15
17
`NativeRopeServer` provides a set of signals for fine-tuned execution order handling:
16
18
@@ -27,11 +29,11 @@ They get emitted just before/after rope updates.
27
29
3. Rope update
28
30
4.`on_post_update`
29
31
5.`on_post_post_update`
30
-
2.`_process()`
31
-
3.`_physics_process()`
32
+
2.`_physics_process()`
33
+
3.`_process()`
32
34
33
35
These signals are also used by various rope utilities like `RopeAnchor`, `RopeHandle` or `RopeRendererLine2D` to update the rope's properties or their own just before/after rope updates occur.
34
-
At the moment they use the normal `pre` and `post` signals, not `pre_pre` or `post_post`.
36
+
They use the normal `pre` and `post` signals, so it is safe to use `pre_pre` or `post_post` without interfering with them.
0 commit comments