Iterate through all 3D objects
-
Introduction
When there are many objects in a 3D scene, you can iterate through all of them using the following block:
This block will go through all 3D objects created in the current sprite one by one. The variable dropdown allows you to specify a variable, so that the name of each object is stored in this variable one by one.You can use this variable to select that object inside this loop, and then add other blocks to manipulate that object.
Example Program
This program will create 3 boxes and move them one by one repeatedly. Note that to move a box, we need to select it as the “sprite object” first, and the “object name” variable tells us the name of each box.
This is the result:
You can try the program here:https://play.creaticode.com/projects/3b5253351ee5292751648924