1. Help Center
  2. Tutorials
  3. Office Sandbox Authoring Tutorials

Office Tutorial 4 - Add a Character

Select a character to interact with and add them to the scene.

Training Notes

In this tutorial, we will select a character and use the "Spawn Asset" resource to add them to our scene.

Quick Links

Step 1: Create a New Script

Step 2: Rename the First Frame and Add a Positional Anchor

Step 3: Spawn Character

In the Headset

Key Takeaways

Your Characters

In this sandbox environment, you have two characters to choose from:

Artboard 1

We will be dynamically adding one of these characters to the scene.

Step 1: Create a New Script

  • Create a new script called "Spawn Character":

  • Open the "Spawn Character" script.

Step 2: Rename the First Frame and Add a Positional Anchor

  • With the "Spawn Character" script open, re-name the first frame "Position":

  • Open the catalogs by clicking on the folder icon on the far right:

  • Find the catalog called "Character Positions".
  • Drag "Character at Office Door" to your frame:

Add position anchor

Step 3: Spawn Character

  • With the Spawn Character script open, create a new main frame.
  • Re-name it "Spawn Character":

  • Go to the Resources tab.
  • Find "Spawn Asset".
  • Drag and drop "Spawn Asset" in your frame.

  • Click the "+" beside the "Asset Instance".
  • Click the "+" beside "Asset".  The catalog will open.
  • Choose "Character Assets".
  • Choose either Female_Character_Stacey or Male_Character_Ted.  In this tutorial, we've chosen Stacey.

2021-01-15_10-50-01 (1)

Finally, you need to set the position of the character. We have created predetermined positional anchors and have added one to this script.

  • Find "Relative Position" in the Position dropdown.

You will see space to enter coordinates of a relative position, but there is also a field for "Anchor Object".

  • Under Anchor Object dropdown, choose "Character at office door".

set position

  • Save the script.

As you've learned, we must add this Spawn Character script to the Director Script in order for it to run.

  • Open the Director Script.
  • Add a new top-level frame.
  • Re-name the frame "Spawn Character".
  • Drag the Spawn Character script into the frame.
2021-01-15_11-03-13 (1)
  • STOP:  Save and test. You will now see the character standing at the door.

In the Headset

This is what your scenario will look like so far:

 

Training Notes

Key Takeaways from Tutorial 4

  • When spawning an asset, you need to set the position of the character.  This can be done via a positional anchor that you've added to your catalog or you will see space to enter coordinates of a relative position.

Next Up:  Office Tutorial 5 - Character Dialog