Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    The 3D Axis

    3D Blocks
    1
    1
    815
    Loading More Posts
    • 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.
    • info-creaticode
      CreatiCode last edited by admin

       

      Prerequisite

      • Initializing a 3D Scene

       

      Description

      In 2D projects, we use 2 arrows to represent the X and Y directions. In 3D projects, we use 3 arrows to represent the X, Y and Z directions:

      ccimg3||900||,

       
      You can use this block to add 3 arrows to represent X, Y and Z directions.

      ccimg3||400||,

       

      Parameters

      • visible: If “yes”, the 3D axis is shown; if “no”, it will be hidden.
      • arrow length: a number that controls the length of the 3 arrows, which is 500 by default

       
       

      Behavior

      By default, the X-axis will point to the right, and the Y-axis will point into the screen, and the Z-axis will point up. They all start from the same point called the “origin”, which is the center of the 3D world.

      The opposite directions of the 3 axes are called the “negative” directions. For example, the negative X direction points to the left, since it is opposite to the x-axis’s direction.

      When you move the camera to look down from the top, you will find the X and Y axes are the same as the 2D axes. The benefit is that most objects would only move on the ground, so we only need to work with the X and Y directions in those cases.

      ccimg||500||,

       
       

      Note on the Z-axis

      Many people tend to forget that the Z-axis is the vertical axis that points up. To help you remember it, think of the letter “Z” as the shape of the stairs, which can help you go up:

      ccimg||300||,

       

      Example Program

      Note that you have to initialize a 3D scene before loading the 3D axis:

      ccimg2||400||,

       
       

      Different Coordinate Systems (Advanced)

      There are many tools and platforms for working with 3D scenes. Unfortunately, they may define the X/Y/Z directions differently.

      Here are some example systems for each convention:

      • X points to the right, Y points forward, Z points up: CreatiCode, Tinkercad, Blender, 3ds Max, AutoCAD, SketchUp
      • X points to the right, Y points up, Z points forward: Unity, Cinema 4D
      • X points to the right, Y points backward, Z points up: Unreal Engine
      • X points to the right, Y points up, Z points backward: Maya, Houdini

       
      CreatiCode’s convention makes it easier for students who already know Scratch’s 2D coordinates. When you move the camera to look down from above, you would get the familiar 2D directions (X points to the right and Y points up), and blocks like “turn left” or “change x” would work the same way.

       
       

      Learn More

      • Adding Boxes to a 3D Scene
      1 Reply Last reply Reply Quote 0
      • Pinned by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • Referenced by  info-creaticode info-creaticode 
      • First post
        Last post