Run code when the 3D scene is ready
CreatiCode last edited by info-creaticode
For every 3D project, before we can run any 3D block, we have to initialize the 3D scene.
For example, if we try to run these blocks to add a box at the beginning of the program, the box will not be added successfully, because when the “add box” block runs, the scene has not been completely initialized.
To run any code after the 3D scene has completed initialization, you can attach them to this block:
For example, this is the revised program that adds a box right after the scene has been initialized:
Note that you can also use this block in other sprites, and it will always wait until the 3D scene is ready.