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. Run code when the 3D scene is ready

Run code when the 3D scene is ready

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 658 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

    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.

    858ce899-8302-4a88-90b1-96022ad00bd9-image.png

     

    To run any code after the 3D scene has completed initialization, you can attach them to this block:

    73dafdb6-d9a7-4f72-8548-d0a9b5d5b3aa-image.png

     
    For example, this is the revised program that adds a box right after the scene has been initialized:

    e20774de-55ca-4e18-b9c6-9681d26f733a-image.png

     
    Note that you can also use this block in other sprites, and it will always wait until the 3D scene is ready.

    1 Reply Last reply
    0
    • CreatiCodeI CreatiCode pinned this topic on

    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