8. MYTY Kit Controllers
What is a Controller?
MYTY Kit comes with a Bone Controller
, Sprite Controller
and Rigged Sprite Controller
. The Bone Controller transforms the Avatarโs Bones for bone animation. The Sprite Controller selects Avatarโs Sprites for frame animation. Lastly, The Rigged Sprite Controller combines the Bone Controller and the Sprite Controller so that it can control the bone-rigged sprites.
Each Controller except the Rigged Sprite Controller is divided further, based on the number and function of the input variables from the motion tracking data.
Bone Controller is divided into
Bone 1D Controller
, andBone 2D Controller
.Sprite Controller is divided into
Sprite 1D Range Controller
andSprite 2D Nearest Controller
.
Bone Controller
Bone 1D Controller
Bone 2D Controller
Sprite Controller
Sprite 1D Range Controller
Sprite 2D Nearest Controller
Rigged Sprite 2D Nearest Controller
Key Summary of Controllers
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!
When the user moves their eyebrows up and down, the Avatarโs eyebrows also move up and down.
When the user blinks, the Avatarโs eyelids also move up and down.
โ How to use the Bone 1D Controller
Bone 1D Controller tool reference
Controller
: Select the Controller youโd like to customize.Add
: Add Bones youโd like to connect to the Controller.Remove
: โDisconnectโ selected Bone(s) from the Controller.RemoveAll
: โDisconnectโ all Bones from the Controller.Bone List
: Display the list of Bones connected to the Controller.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.Min
: Set the minimum value of the Boneโs range of motion.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.
โ How to use the Bone 2D Controller
Bone 2D Controller tool reference
Controller
: Select the Controller youโd like to customize.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.Add GameObjects
: Add Bones youโd like to connect to the Controller.Remove
: โDisconnectโ selected Bone(s) from the Controller.RemoveAll
: โDisconnectโ all Bones from the Controller.Bone List
: Display the list of Bones connected to the Controller.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.Position, XY Scale factor
: Position indicates the position of the Control Panel's pointer. By adjusting the scale factor, you can expand or contract the Control Panel.Reset Position
: This button resets all Bone states to the Origin values.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, and Down directions.
Sprite Controller
Sprite 1D Range Controller
This Controller manipulates Sprites based on the range of a single floatโs value.
โ How to use the Sprite 1D Controller
Sprite 1D Range Controller tool reference
Controller
: Select the Controller youโd like to customize.Add
: Add Sprite Object(s) youโd like to connect to the Controller.Remove
: โDisconnectโ selected Sprite Object(s) from the Controller.RemoveAll
: โDisconnectโ all Sprite Object(s) from the Controller.GameObejcts List
: This displays a list of all sprite objects connected to the current Controller.Min,Max
: Set the minimum and maximum values of the motion data being fed as input to the current Controller.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.Current Label
: This displays the sprite label for the avatar currently shown in the scene.Auto Load Labels
: Automatically load sprite label(s) from the Sprite library.Sprites list
: This is a list of sprites for frame animation automatically loaded from imported assets. You can set the data value in which each sprite will appear.
Sprite 2D Nearest Controller
This Controller takes two float values and displays the Sprites with the closest coordinate designation.
โ How to use the Sprite 2D Controller
Sprite 2D Nearest Controller tool reference
Controller
: Select the Controller youโd like to customize.Add
: Add Sprite Object(s) youโd like to connect to the Controller.Remove
: โDisconnectโ selected Sprite Object(s) from the Controller.RemoveAll
: โDisconnectโ all Sprite Object(s) from the Controller.GameObjects List
: This displays a list of all sprite objects connected to the current Controller.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.Current Value, Bottom Left, Top Right
: Current 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.Pivot name, Pivot Position
: Pivot name: The state of the deformed sprite mesh is saved with its name. Pivot Position: The state of the deformed sprite mesh is saved in the corresponding value position.Copy Position
: Copies the position value of the current pointer.Make New Pivot
: A button that creates a pivot with a pivot name and pivot position.Auto Load Labels
: Automatically load sprite label(s) from the Sprite library.Sprite Pivots list
: This is a list of sprites for frame animation automatically loaded from imported assets. By double-clicking each pivot, You can set the data value in which each sprite will appear.
Rigged Sprite 2D Nearest Controller
This Controller takes two float values and displays the bone-rigged sprites with the closest coordinate designation.
-> How to use the Rigged Sprite 2D Nearest Controller
Controller
: Select the Controller youโd like to customize.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.Add
: Add Bones youโd like to connect to the Controller.Remove
: โDisconnectโ selected Bone(s) from the Controller.RemoveAll
: โDisconnectโ all Bones from the Controller.Bone List
: Display the list of Bones connected to the Controller.Anchor
: This button sets the sprite mesh based on the transform information of the selected bones. Click to switch the window to editor mode.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.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.Pivot name, Pivot Position
: Pivot name: The state of the deformed sprite mesh is saved with its name. Pivot Position: The state of the deformed sprite mesh is saved in the corresponding value position.Copy Position
: Copies the position value of the current pointer.Make New Pivot
: A button that creates a pivot with a pivot name and pivot position.Pivots list
: Created Pivots list.
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.
Right click on the Hierarchy window and select
Create Empty
.Rename
GameObject
toControllerGroup
.
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 -> Bone 1D Controller(Script)
Bone 2D Controller -> Bone 2D Controller(Script)
Sprite 1D Range Controller -> Sprite 1D Range Controller MSR(Script)
Sprite 2D Nearest Controller -> Sprite 2D Nearest Controller MSR(Script)
Rigged Sprite 2D Nearest Controller -> Rigged Sprite 2D Nearest Controller(Script)
3. Navigate to Header Toolbar > MYTY Kit
and 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
Root Controller & Controller Group
This is the uppermost controller, and has the
Root Controller(Script)
andController
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 & Rigged Sprite 2D Nearest Controller
Bone Controllers and Rigged Sprite 2D Nearest Controller exist under the Root Controller. You can set Parent-Child relationships to reflect the hierarchy of desired animations and Rigged Bones. Bone Controllers at the same level must manipulate different Bones.
Last updated