Joints
public static class Joints
Namespace: AR51.Unity.SDK
The canonical joint-index map for the position arrays returned by Skeleton.GetPositions<Vector3>() and Person.Positions. Every joint is a public const int index into those arrays; the class also exposes name↔index lookup tables and the line/connection data used to draw skeleton gizmos. The body layout is OpenPose-25 (indices 0–24); the hand joints follow, starting at RightWrist = 25.
Joints itself holds only integer indices — no spatial data. The arrays it indexes (Person.Positions, Skeleton.GetPositions<Vector3>()) are Unity world-space Vector3 in meters.
Body joint indices (OpenPose-25)
The first 25 indices are the body, in OpenPose-25 order. CountWithoutHands is 25; CountWithHands is the full body + both hands (= LeftPinkyTip + 1).
public const int CountWithoutHands = 25;
public const int CountWithHands; // = LeftPinkyTip + 1 (full body + both hands)
// Body (OpenPose-25 layout)
public const int Nose = 0;
public const int Neck = 1;
public const int RShoulder = 2;
public const int RElbow = 3;
public const int RWrist = 4;
public const int LShoulder = 5;
public const int LElbow = 6;
public const int LWrist = 7;
public const int MidHip = 8;
public const int RHip = 9;
public const int RKnee = 10;
public const int RAnkle = 11;
public const int LHip = 12;
public const int LKnee = 13;
public const int LAnkle = 14;
public const int REye = 15;
public const int LEye = 16;
public const int REar = 17;
public const int LEar = 18;
public const int LBigToe = 19;
public const int LSmallToe = 20;
public const int LHeel = 21;
public const int RBigToe = 22;
public const int RSmallToe = 23;
public const int RHeel = 24;
// Hip aliases (both resolve to MidHip = 8)
public const int Hip = MidHip;
public const int Hips = MidHip;
Hand joint indices
The hand joints begin immediately after the body at RightWrist = 25, then run per finger in Proximal → Middle → Distal → Tip order; the left hand follows the right. Each finger group is exposed twice — once with descriptive names and once with anatomical aliases:
| Descriptive | Anatomical alias |
|---|---|
RightIndexProximal | RIndex1Knuckles |
RightIndexMiddle | RIndex2PIP |
RightIndexDistal | RIndex3DIP |
RightIndexTip | RIndex4FingerTip |
| … (same pattern for thumb / middle / ring / pinky, both hands) | … |
Per-finger offset constants (added to a hand's wrist index to reach that finger's first joint):
public const int ThumbOffset = 1;
public const int IndexOffset = 5;
public const int MiddleOffset = 9;
public const int RingOffset = 13;
public const int PinkyOffset = 17;
Spine / clavicle indices are also defined: LClavicle, RClavicle, and Spine0…Spine6.
These body-array hand indices (Joints, starting RightWrist = 25) are not the same enumeration as the device hand-tracking HandJointType, which indexes HandJointInfo[] from Wrist = 0. Use Joints for the full-body skeleton arrays; use HandJointType for the hands-adapter arrays.
Helper data
Static tables used for drawing and grouping joints.
| Member | Type | Description |
|---|---|---|
| Drawing | ||
JointLines | JointLine[] | colored from→to pairs for drawing the skeleton |
GizmoLineConnections | int[][] | bone connections used to draw the skeleton gizmo |
| Grouped indices | ||
FootJointIndices | int[] | { LHeel, LBigToe, LSmallToe, RHeel, RBigToe, RSmallToe } |
HeadJoints | List<int> | { Nose, REye, LEye, REar, LEar } |
HandWristPairs | int[] | wrist-pair indices for the hands |
HandStrips | int[] | per-finger strip indices for the hands |
RightLeftOffset | int[] | { RightWrist, LeftWrist } — base index of each hand |
| Lookup | ||
JointByString | Dictionary<string,int> | name → index |
NameByJointIndex | Dictionary<int,string> | index → name |
Method summary
| Method | Returns | |
|---|---|---|
GetJointName | string | static |
Parse | int | static |
→ Full descriptions in Method details below.
Method details
GetJointName
public static string GetJointName(int jointIndex);
The display name for a joint index (the reverse of Parse). Backed by NameByJointIndex.
Joints constant, e.g. Joints.RWrist)"RWrist")foreach (var person in SkeletonConsumer.Instance.Persons)
{
Vector3 head = person.GetPosition(Joints.Nose); // meters
Debug.Log($"{Joints.GetJointName(Joints.Nose)} at {head}");
}
Parse
public static int Parse(string s);
Resolve a joint name to its index (the reverse of GetJointName). Backed by JointByString.
"RWrist")-1 if the name is unknownNested types
JointLine
public struct JointLine
{
public int From;
public int To;
public Color Color;
public JointLine(int from, int to, Color color);
}
A single colored bone segment: two joint indices and the Color to draw it in. The JointLines table is an array of these, consumed by the skeleton-drawing helpers.
HandJoints
sealed class Unity componentpublic sealed class HandJoints : MonoBehaviour
Namespace: AR51.Unity.SDK
A MonoBehaviour marker component placed on a hand-joint hierarchy. It is a separate type from the static Joints index map above.
HandJoints has an empty body — no public members in this version; it appears to exist only as a tag/marker on a hand-joint hierarchy. Confirm its intended role before relying on it.
See also
Skeleton— the per-frame payload whoseGetPositions<Vector3>()buffer these indices addressPerson— exposesPositions/GetPosition(int)indexed by these constantsHandJointType— the separate device hand-tracking joint enumeration (Wrist = 0)- Skeletons & characters — area overview
- Class index — all Unity SDK types