Navigation

    CreatiCode Scratch Forum

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

    Loading an Avatar Into a Scene

    3D Blocks
    1
    1
    820
    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

      • Creating Your Own Avatar Using ReadyPlayer.me

       

      Description

      You can load an avatar into a scene to represent yourself or another player. There are 2 ways to add an avatar: adding the avatar uploaded by a user, or adding a pre-built avatar model.

       

      Block for Adding a User’s Avatar

      To use this block, the user running the project has to have uploaded an avatar model.

      • Avatar File Name: In most situations, you should keep this input as “default”, so that it will load the default avatar set by the user who is running the project. For premium users, there can be multiple avatars on the “my avatars” page, so you can specify the name of the specific avatar you want to use.

      • User Name: the name of the user whose avatar we are loading. For now, you can only use the value “me”, which represents the user who is running this program. If this user does not have any avatar uploaded yet, then this block will do nothing. In future releases, you will be able to load the avatar of another user.

      • Avatar Height: the body height of the avatar. By default, the height will be set to 100 units.

      • Avatar Name: the name of the avatar object. We can use this name to refer to this avatar in other blocks. See Names and Sprite Objects for more details.

      • Is Hidden: if “yes”, then the avatar will not be displayed when loaded. You can make it visible again using the purple “show” block under “Looks”.

       

      Behavior

      When running this block, the avatar of the current user will be downloaded and added to the 3D scene. Note that this block will not work before a 3D scene has been initialized.

       

      Example

      Program:

      Output:

      ccimg||500||,

       
       

      Block for Adding a Pre-built Avatar

      • Avatar Model Name: the name of the pre-built avatar model to be loaded. When you click the “Please Select” input box, a library window will present all the pre-built avatar models you can choose from:

      ccimg||1000||,||40

      • Avatar Height: the body height of the avatar. By default, the height will be set to 100 units.

      • Avatar Name: the name of the avatar object. We can use this name to refer to this avatar in other blocks. See Names and Sprite Objects for more details.

      • Is Hidden: if “yes”, then the avatar will not be displayed when loaded. You can make it visible again using the purple “show” block under “Looks”.

       

      Behavior

      When running this block, the selected avatar model will be downloaded and added to the 3D scene. Note that this block will not work before a 3D scene has been initialized.

       

      Example

      Program:

      Output:

      ccimg||400||,

       

      Demo

      Here is how to add an avatar as hidden, then make it show again:

       

      Learn More

      • Names and Sprite Objects
      1 Reply Last reply Reply Quote 0
      • Pinned by  A admin-tcode 0 
      • 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