> For the complete documentation index, see [llms.txt](https://spectrexr.gitbook.io/octoxr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spectrexr.gitbook.io/octoxr/hand-pose-detection/how-to-use.md).

# How To Use

### Setting Up

Drag and drop *<mark style="color:blue;">**HandLeft**</mark>* and *<mark style="color:blue;">**HandRight**</mark>* in the scene.

Reference *<mark style="color:blue;">**XRRig**</mark>* to *<mark style="color:blue;">**InputRoot**</mark>* of *<mark style="color:blue;">**MultiSourceInputDataProvider**</mark>* for each hand.

Create an empty game object and name it "Left Hand Poses". Add <mark style="color:blue;">**HandPoseHandRef**</mark> component and reference left hand skeleton. Leave hand poses array empty for now.

Creaty an empty game object as a child of "Left Hand Poses" and name it "Thumbs Up".

Add *<mark style="color:blue;">**HandPose**</mark>* component to the object.

Each hand pose can be defined by multiple *<mark style="color:blue;">**IHandPoseComponent**</mark>* components. Currently there are two concrete components implemented: *<mark style="color:blue;">**HandPoseShape**</mark>* and *<mark style="color:blue;">**HandPoseOrientation**</mark>*

Add *<mark style="color:blue;">**HandPoseShape**</mark>* to the components array of HandPose. Define your shape by dragging <mark style="color:blue;">**HandShape**</mark> scriptable objects in Shapes array. <mark style="color:blue;">**HandShape**</mark> scriptable objects are at Assets/OctoXR/Core/ScriptableObjects/HandPoseDetection.\
Thumbs Up hand shape is defined by thumb in extension and all other fingers in flexion.

Add <mark style="color:blue;">**HandPoseOrientation**</mark> to the components array of HandPose. Set orientation mode to:\
Palm Back, Palm Right, Fingers Forward and Fingers Right.

Go back to <mark style="color:blue;">**HandPoseHandRef**</mark> component that is attached to "Left Hand Poses" game object and reference "Thumbs Up" game object to Hand poses array.

Your Thumbs Up pose should look somewhat like this:

<figure><img src="/files/Te2yE9Wz8PLTz1GIvAw6" alt=""><figcaption></figcaption></figure>

### Creating Hand Shapes

Create an empty game object and name it "Shape Creator". Attach <mark style="color:blue;">**HandShapeCreator**</mark> component.

Reference a hand skeleton component (it's irrelevant if it's right hand or left hand skeleton because hand shapes are interchangeable for both hands). Right click somewhere in the assets folder and create a <mark style="color:blue;">**HandShape**</mark> (Create/OctoXR/HandShape). Reference that hand shape in the the target pose property of shape creator. In the Hand Bones dropdown select which bones would you like to create your shape for.

Enter play mode, show your shape with the hand (same hand you referenced your hand skeleton) and click Create Shape button.
