Login

Fancade Wiki

Updated Late Update.md (markdown)

... ...
@@ -1,16 +1,21 @@
1
The Late Update block will execute scripts _after_ physics.
2
3
Since physics will change the position of objects after scripts have run, which is sometimes unwanted, it can be useful to instead run the physics first. This ensures that your scripts are working with the updated positions of the objects.
1
Late Update executes scripts _after_ the physics simulation.
4 2
5 3
[[/uploads/Late Update.png]]
6 4
5
Outputs:
6
- After Physics: The scripts you want to run after physics.
7
7 8
## Notes
8 9
9
Late Update isn't a delay block , most people mistake it as a delay block , but what really is the the use of this block if it seems to not do anything?
10
- Each frame Fancade does the following:
11
1. Run scripts
12
2. Simulate physics
13
3. Run Late Update scripts
14
- If you want to delay execution for _multiple_ frames, check out the example in [[Decrease Number]].
15
16
## Examples
10 17
11
Late update runs *after physics* , what does it mean?? ..... In a level a set of function runs in this order :
12
- Scripts
13
- Physics
14
- Late Update
18
1. Position an object exactly "glued to" a physics object
19
2. Initialize blocks after they've all added themselves to a list
15 20
16
And that is what it means! ... Late Update will run after scripts and physics functions and is useful to control some unwanted things after physics have ran.
... ...
\ No newline at end of file
0
TODO: Actual script examples of the above.
... ...
\ No newline at end of file
Fancade Wiki