Late Update: Difference between revisions

Updated and revisited the page
(Created page with "Late Update executes scripts _after_ the physics simulation. /uploads/Late Update1.png Outputs: * After Physics: The scripts you want to run after physics. == Notes == * Each frame Fancade does the following: 1. Run scripts 2. Simulate physics 3. Run Late Update scripts == Examples == A. Position an object exactly "glued to" a physics object File:Screenshot_20210127-091113_6c69499164362a0dbe2f1dfe7c62199a.jpg B. Init...")
 
(Updated and revisited the page)
 
Line 1: Line 1:
Late Update executes scripts _after_ the physics simulation.
{{Block
|image=Late Update.png
|type=s
|folder=control
|input1={{Port|e|Before}}
|output1={{Port|e|After Physics}}
|output2={{Port|e|After}}
}}


[[width=336px,alt=Late Update|/uploads/Late Update1.png]]
Late Update executes scripts ''after'' the physics simulation.
 
Outputs:
* After Physics: The scripts you want to run after physics.


== Notes  ==
== Notes  ==
Line 12: Line 16:
     2. Simulate physics
     2. Simulate physics
     3. Run Late Update scripts
     3. Run Late Update scripts
    4. Display everything to the screen


== Examples ==
== Examples ==


A. Position an object exactly "glued to" a physics object
* Position an object to look visually "glued to" a physics object.
[[File:Screenshot_20210127-091113_6c69499164362a0dbe2f1dfe7c62199a.jpg]]
: [[File:Late Update example1.jpg|none|thumb|Object B will not lag behind Object A]]
B. Initialize blocks after they've all added themselves to a list
 
[[File:Screenshot_20210127-091647_6c69499164362a0dbe2f1dfe7c62199a.jpg]]
* Initialize blocks after they've all added themselves to a list.
C. Late Update can be used to make invisible physics objects
: [[File:Late Update example2.jpg|none|thumb|The loop is guaranteed to run after all objects have been added to the list]]
[[File:Screenshot_20210127-091506_6c69499164362a0dbe2f1dfe7c62199a.jpg]]
 
* Late Update can be used to make invisible physics objects.
: [[File:Late Update example3.jpg|none|thumb|]]






[[Category:Blocks]]
[[Category:Blocks]]