Input
This section describes input related scripts and logic used in OctoXR
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 bone | Wrist | - | 0 |
Palm center | Palm | Wrist | 1 |
Thumb finger metacarpal bone | ThumbMetacarpal | Wrist | 2 |
Thumb finger proximal phalanx | ThumbProximal | ThumbMetacarpal | 3 |
Thumb finger distal phalanx | ThumbDistal | ThumbProximal | 4 |
Thumb finger tip | ThumbTip | ThumbDistal | 5 |
Index finger metacarpal bone | IndexMetacarpal | Wrist | 6 |
Index finger proximal phalanx | IndexProximal | IndexMetacarpal | 7 |
Index finger intermediate phalanx | IndexIntermediate | IndexProximal | 8 |
Index finger distal phalanx | IndexDistal | IndexIntermediate | 9 |
Index finger tip | IndexTip | IndexDistal | 10 |
Middle finger metacarpal bone | MiddleMetacarpal | Wrist | 11 |
Middle finger proximal phalanx | MiddleProximal | MiddleMetacarpal | 12 |
Middle finger intermediate phalanx | MiddleIntermediate | MiddleProximal | 13 |
Middle finger distal phalanx | MiddleDistal | MiddleIntermediat | 14 |
Middle finger tip | MiddleTip | MiddleDistal | 15 |
Ring finger metacarpal bone | RingMetacarpal | Wrist | 16 |
Ring finger proximal phalanx | RingProximal | RingMetacarpal | 17 |
Ring finger intermediate phalanx | RingIntermediate | RingProximal | 18 |
Ring finger distal phalanx | RingDistal | RingIntermediate | 19 |
Ring finger tip | RingTip | RingDistal | 20 |
Little finger metacarpal bone | LittleMetacarpal | Wrist | 21 |
Little finger proximal phalanx | LittleProximal | LittleMetacarpal | 22 |
Little finger intermediate phalanx | LittleIntermediate | LittleProximal | 23 |
Little finger distal phalanx | LittleDistal | LittleIntermediate | 24 |
Little finger tip | LittleTip | LittleDistal | 25 |
Certain bones in the previous table, such as finger tips and hand palm 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, with the exception of non-thumb finger metacarpal bones, are considered as rotating, i.e they rotate relative to the bones they are attached to (their parent bones) or, in case of Wrist bone, 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), Little (4).
Last updated