Configuration
Input in OctoXR is handled via several main scripts described in further sections. It is mostly abstracted to a certain degree in order to easily add support for additional platforms. It is mainly centered around hand tracking input, but controller support could be added with relative ease as well.
OctoXR uses a single configuration for the representation of a user hand and hand parts. Many scripts and especially input related ones often expose collections of hand bones or other types of objects that always contain a fixed number of elements that can be indexed by hand bone identities. Identities of the hand bones are listed in code via HandBoneId enumeration. Hand bones used by OctoXR as well as their identities and relations are listed in the following table.
| Hand part / bone | HandBoneId | Parent HandBoneId | Index / ID Number |
|---|---|---|---|
| Wrist root | WristRoot | - | 0 |
| Thumb finger metacarpal bone | ThumbFingerMetacarpal | WristRoot | 1 |
| Thumb finger proximal phalanx | ThumbFingerProximalPhalanx | ThumbFingerMetacarpal | 2 |
| Thumb finger distal phalanx | ThumbFingerDistalPhalanx | ThumbFingerProximalPhalanx | 3 |
| Index finger proximal phalanx | IndexFingerProximalPhalanx | WristRoot | 4 |
| Index finger middle phalanx | IndexFingerMiddlePhalanx | IndexFingerProximalPhalanx | 5 |
| Index finger distal phalanx | IndexFingerDistalPhalanx | IndexFingerMiddlePhalanx | 6 |
| Middle finger proximal phalanx | MiddleFingerProximalPhalanx | WristRoot | 7 |
| Middle finger middle phalanx | MiddleFingerMiddlePhalanx | MiddleFingerProximalPhalanx | 8 |
| Middle finger distal phalanx | MiddleFingerDistalPhalanx | MiddleFingerMiddlePhalanx | 9 |
| Ring finger proximal phalanx | RingFingerProximalPhalanx | WristRoot | 10 |
| Ring finger middle phalanx | RingFingerMiddlePhalanx | RingFingerProximalPhalanx | 11 |
| Ring finger distal phalanx | RingFingerDistalPhalanx | RingFingerMiddlePhalanx | 12 |
| Pinky finger proximal phalanx | PinkyFingerProximalPhalanx | WristRoot | 13 |
| Pinky finger middle phalanx | PinkyFingerMiddlePhalanx | PinkyFingerProximalPhalanx | 14 |
| Pinky finger distal phalanx | PinkyFingerDistalPhalanx | PinkyFingerMiddlePhalanx | 15 |
| Thumb finger tip | ThumbFingerTip | ThumbFingerDistalPhalanx | 16 |
| Index finger tip | IndexFingerTip | IndexFingerDistalPhalanx | 17 |
| Middle finger tip | MiddleFingerTip | MiddleFingerDistalPhalanx | 18 |
| Ring finger tip | RingFingerTip | RingFingerDistalPhalanx | 19 |
| Pinky finger tip | PinkyFingerTip | PinkyFingerDistalPhalanx | 20 |
The last five bones are finger tip bones and they don't correspond to any real bone in human hand. These bones are mostly auxiliary bones used throughout OctoXR in order to e.g. determine the length of the top-most phalanx of a particular finger or to quickly determine where the user points with his/her particular finger etc. These bones are considered as non-rotating bones. All the rest are considered as rotating, i.e they rotate relative to the bones they are attached to (their parent bones) or, in case of WristRoot, they rotate relative to the absolute space used as the common frame of reference for every object in the scene - world space.
In addition to hand bones there are several places where you can access certain members indexed by hand fingers. Fingers are listed in HandFinger enumeration and they are, in order with their indices: Thumb (0), Index (1), Middle (2), Ring (3), Pinky (4).