8. MYTY Kit Controllers

What is a Controller?

The MYTY Kit comes with a Bone Controller and a Sprite Controller. The Bone Controller transforms the Avatar’s Bones for bone animation. The Sprite Controller selects Avatar’s Sprites for frame animation.
Each Controller is divided further, based on the number and function of the input variables from the motion tracking data.
  • Sprite Controller is divided into Sprite 1D Controller and Sprite 2D Controller.
  • Bone Controller is divided into Bone 1D Controller, and Bone 2D Controller.
The four types of Controllers in the MYTY Kit.
  • Bone Controller
    • Bone 1D Controller
    • Bone 2D Controller
  • Sprite Controller
    • Sprite 1D Controller
    • Sprite 2D Controller

Key Summary of Controllers

Bone1D Controller
Bone2D Controller
Sprite1D Controller
Sprite2D Controller
Input
The float value of 1 MotionAdapter Output.
The float values of 2 MotionAdapter Output.
The float value of 1 MotionAdapter Output.
The float values of 2 MotionAdapter Output.
Output
Transformation of connected bone(s).
Transform Control of connected Bone.
Selection of appropriate sprite image(s) to display.
Selection of appropriate sprite image(s) to display.
For the relationship between the Controller and MotionAdapter, please refer to 6. Before Rigging

Bone Controller

The Bone Controller transforms bones rigged to an Avatar. Bones have three transform states: Position, Rotation, and Scale. Controllers use external inputs to change the three transform states and make the Avatar move.

The following are defined in the Bone Controller.

  • A list of bones to manipulate. (At least 1)
  • conTransform state when input variable(s) is(are) at min/max

Bone 1D Controller

This Controller manipulates Bones using 1 float value as an input variable.
  • You can use the Bone 1D Controller to make animations like these!
    1. 1.
      When the user moves their eyebrows up and down, the Avatar’s eyebrows also move up and down.
    2. 2.
      When the user blinks, the Avatar’s eyelids also move up and down.

Bone 1D Controller tool reference

  1. 1.
    Controller: Select the Controller you’d like to customize.
  2. 2.
    Add: Add Bones you’d like to connect to the Controller.
  3. 3.
    Remove: “Disconnect” selected Bone(s) from the Controller.
  4. 4.
    RemoveAll: “Disconnect” all Bones from the Controller.
  5. 5.
    Bone List: Display the list of Bones connected to the Controller.
  6. 6.
    Control Slider: This Slider is activated once the Input Variable’s Min and Max values and their respective Transform States have been set. You can change the Control Value to preview the Avatar’s movement.
  7. 7.
    Min : Set the minimum value of the Bone’s range of motion.
  8. 8.
    Max : Set the maximum value of the Bone’s range of motion.

Bone 2D Controller

This Controller manipulates Bones using 2 float values as input variables.
You can use the Bone 2D Controller to make animations like these!

Bone 2D Controller tool reference

  1. 1.
    Controller: Select the Controller you’d like to customize.
  2. 2.
    Recursive Selection: Check this checkbox to include child(ren) bone(s) when adding a bone object. Unchecking this checkbox will only add the selected bone object.
  3. 3.
    Add GameObjects: Add Bones you’d like to connect to the Controller.
  4. 4.
    Remove: “Disconnect” selected Bone(s) from the Controller.
  5. 5.
    RemoveAll: “Disconnect” all Bones from the Controller.
  6. 6.
    Bone List: Display the list of Bones connected to the Controller.
  7. 7.
    Control Panel: This Panel is activated once transform states of Bones have been added using the Pivots Buttons (9). You can move the panel’s pointer to preview the Avatar’s movements in the XY axes.
  8. 8.
    Reset Position: This button resets all Bone states to the Origin values.
  9. 9.
    Origin, Left, Right, Up, Down: Set the transform values of all bones in the bone list for the Origin(al) position and the Left, Right, Up, Down directions.

Sprite Controller

Sprite 1D Controller

This Controller manipulates Sprites based on the range of a single float’s value.
You can use the Sprite 1D Controller to make animations like these!

Sprite 1D Controller tool reference

  1. 1.
    Controller: Select the Controller you’d like to customize.
  2. 2.
    Add: Add Sprite Object(s) you’d like to connect to the Controller.
  3. 3.
    Remove: “Disconnect” selected Sprite Object(s) from the Controller.
  4. 4.
    RemoveAll: “Disconnect” all Sprite Object(s) from the Controller.
  5. 5.
    GameObejcts List: This displays a list of all sprite objects connected to the current Controller.
  6. 6.
    Min,Max: Set the minimum and maximum values of the motion data being fed as input to the current Controller.
  7. 7.
    Value: Modulate the motion data value being fed as input to the current Controller. This slider can be used to preview the sprite animation for a given input value.
  8. 8.
    Current Label: This displays the sprite label for the avatar currently shown in the scene.
  9. 9.
    Auto Load Labels: Automatically load sprite label(s) from the Sprite library.

Sprite 2D Controller

This Controller takes two float values and displays the Sprites with the closest coordinate designation.
You can use the Sprite 2D Controller to make animations like these!

Sprite 2D Controller tool reference

  1. 1.
    Controller: Select the Controller you’d like to customize.
  2. 2.
    Add: Add Sprite Object(s) you’d like to connect to the Controller.
  3. 3.
    Remove: “Disconnect” selected Sprite Object(s) from the Controller.
  4. 4.
    RemoveAll: “Disconnect” all Sprite Object(s) from the Controller.
  5. 5.
    GameObjects List: This displays a list of all sprite objects connected to the current Controller.
  6. 6.
    Control Panel: This panel is activated once one or more sprite labels for an input variable value have been set. You can move the panel’s pointer to preview the avatar’s sprite animation for two input values.
  7. 7.
    Value, Bottom Left, Top Right: Value: Controls the motion data value that is fed as input to the current Controller. Moving the pointer in the Control Panel will change XY values. Bottom Left & Top Right: You can set a particular motion input value for the Bottom Left and Top Right positions.
  8. 8.
    Auto Load Labels: Automatically load sprite label(s) from the Sprite library.

How to use controllers

📌 Please ensure that you follow the following steps in order!

1. Create a ControllerGroup

Before you create a Controller, create a parent object of all controllers and name it the ControllerGroup.
  1. 1.
    Right click on the Hierarchy window and select Create Empty.
  2. 2.
    Rename GameObjectto ControllerGroup.
3. In the Inspector panel, click on Add Component, and select the Root Controller(script)and Controller Group(Script)components.

2. Create Controller

All Controllers follow this step.
1. Right click on ControllerGroup and select Create Empty to create a new Controller Object
While you’re free to name Objects as you wish, it is recommended that you include the name of the applicable Skeleton(Bone group) in the Object’s name.
2. In the Inspector panel, click Add Component and select the Controller Script(s) you want to apply.
  • Applicable Controller Scripts
    • Bone 1D Controller(Script)
    • Bone 2D Controller(Script)
    • Sprite 1D Controller(Script)
    • Sprite 2D Controller(Script)
3. Navigate to Header Toolbar > MYTY Kitand select the Controller that you'd like to use. This will open up the Controller window. You can drag its tab to the Inspector window to use it there.

3. Further steps unique to each Controller

Controller Hierarchy

Example - The Controller hierarchy for GhostsProject avatars

Root Controller & Controller Group

  • This is the uppermost controller, and has the Root Controller(Script) and Controller Group(Script) components.

Sprite 1D/2D Controller

  • Each Sprite Controller is a child element of the Root Controller, and exists independently.

Bone 1D/2D Controller

  • Bone Controllers exist under the Root Controller. You can set Parent-Child relationships to reflect the hierarchy of desired animations and Rigged Bones. Bone Controllers in the same level must manipulate different Bones.
Have a question or an idea? If you have a question to ask or an idea to share, participate in the MYTY Kit Community. We’d love to hear from you.
😄