Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 3D Blocks
  4. Iterate through all 3D objects

Iterate through all 3D objects

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 808 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

    Introduction

    When there are many objects in a 3D scene, you can iterate through all of them using the following block:

    ace349ad-1982-4da7-b3cc-db38788da9f8-image.png

     
    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.

     

    53d80d5c-b1df-4e8c-b203-97b1acb1c949-image.png

     
    This is the result:

    obj.gif

     
    You can try the program here:

    https://play.creaticode.com/projects/3b5253351ee5292751648924

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode