Loading an Avatar Into a Scene
-
Prerequisite
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:
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:
-
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:
Demo
Here is how to add an avatar as hidden, then make it show again:
Learn More
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-