Skip to main content

Hand data

struct + enums static helpers
namespace AR51.Unity.SDK // HandJointInfo, HandType, HandJointType, HandJointInfoExtensions, HandJointTypes, HandJointTypeExtensions, JointSequence
namespace AR51.Unity.SDK.Utilities // HandsAdapterExtensions, HandJointTypeMapping, AnimatorHandsExtensions

The data model the SDK uses to report tracked hands, plus the helpers that operate on it. An IHandsAdapter returns hands as a HandJointInfo[], where each element's array index equals (int)HandJointType — index 0 is the wrist, then thumb, index, middle, ring, and little fingers in order. A joint with Confidence == 0 is considered missing.

Units

Unity positions are in meters, world space. AR 51 mocap data is also in meters, so no conversion is needed inside Unity. (Unreal, by contrast, is cm/degrees.)

HandJointInfo

struct
public struct HandJointInfo

Per-joint pose and confidence sample for a tracked hand — the element type of the arrays returned by IHandsAdapter. Per the source doc comment, where finger-level confidence is unavailable the overall hand confidence is used, and a Confidence of zero means the joint is missing.

Fields

FieldTypeDescription
HandTypeHandTypewhich hand (left/right) this joint belongs to
JointTypeHandJointTypewhich anatomical joint this sample represents
Confidencefloattracking confidence. ⚠️ range appears to be 0–1 (0 = missing), but not explicitly clamped/documented in source
PositionVector3joint position. ⚠️ coordinate space (world vs local) not stated in source; appears to be Unity world space based on consumer usage. Units are Unity meters
RotationQuaternionjoint orientation, in the same space as Position

Constructors

// "missing" joint: Confidence = 0, Position = Vector3.zero, Rotation = Quaternion.identity
HandJointInfo(HandType handType, HandJointType jointType);

// fully specified sample
HandJointInfo(HandType handType, HandJointType jointType,
float confidence, Vector3 position, Quaternion rotation);
Exampleinferred
var adapter = HandsAdapterFactory.GetAdapter();
HandJointInfo[] right = adapter.GetRightJointInfos();

foreach (HandJointInfo j in right)
{
if (j.Confidence == 0f) continue; // missing joint
Debug.Log($"{j.JointType} @ {j.Position} (m)"); // Unity world meters
}

HandType

enum
public enum HandType

Identifies a hand.

ValueInt
RightHand0the right hand
LeftHand1the left hand

HandJointType

enum
public enum HandJointType

Enumerates the hand joints the SDK reports. The integer value is also the canonical array index in a HandJointInfo[] result (index == (int)HandJointType). Ordered wrist-first, then each finger base-to-tip.

JointIndexJointIndex
Wrist0MiddleProximal11
ThumbTrapezium1MiddleIntermediate12
ThumbMetaCarpal2MiddleDistal13
ThumbProximal3MiddleTip14
ThumbDistal4RingProximal15
ThumbTip5RingIntermediate16
IndexProximal6RingDistal17
IndexIntermediate7RingTip18
IndexDistal8LittleMetaCarpal19
IndexTip9LittleProximal20
LittleIntermediate21
LittleDistal22
LittleTip23
note

The thumb and little finger carry an extra base joint (ThumbTrapezium / LittleMetaCarpal) the other fingers do not. Iterate a single finger with JointSequence rather than hard-coding index ranges.

Hand helpers

Static helper/extension types that operate on the model above. Each is small and behavior-only — they cluster here rather than on their own pages.

TypeNamespaceKindWhat it does
HandJointInfoExtensionsAR51.Unity.SDKstatic ext. on HandJointInfo[]extract joint positions, gated on confidence
HandJointTypesAR51.Unity.SDKstaticGetTypes() — all HandJointType values in index order
HandJointTypeExtensionsAR51.Unity.SDKstatic ext. on HandJointTypeIsTip() — is this a fingertip
JointSequenceAR51.Unity.SDKstaticper-finger joint orderings, base-to-tip
HandsAdapterExtensionsAR51.Unity.SDK.Utilitiesstatic ext. on IHandsAdapter / HandJointInfo[]fetch + uniformly scale joints about the wrist
HandJointTypeMappingAR51.Unity.SDK.Utilitiesstatic ext. on HandJointTypemap SDK joints to Unity HumanBodyBones
AnimatorHandsExtensionsAR51.Unity.SDK.Utilitiesstatic ext. on Animatorpull hand/finger bone Transforms off a humanoid rig

HandJointInfoExtensions

static class
public static class HandJointInfoExtensions // AR51.Unity.SDK

Helpers for extracting positions from a joint array (e.g. the result of GetLeftJointInfos/GetRightJointInfos).

MethodReturnsDescription
GetConfidentPositions(this HandJointInfo[] jointsInfo, float minimumConfidence)Vector3[]all joint positions if the array meets the confidence threshold, otherwise an empty array. ⚠️ confidence is checked only against the first element (jointsInfo[0]), treated as the whole-hand gate
GetPositions(this HandJointInfo[] jointsInfo)Vector3[]every joint's Position (meters) in array order, unconditionally
HasConfidentPositions(this HandJointInfo[] jointsInfo, float minimumConfidence)booltrue if the array is non-null, non-empty, and jointsInfo[0].Confidence >= minimumConfidence

HandJointTypes

static class
public static class HandJointTypes // AR51.Unity.SDK
MethodReturnsDescription
GetTypes()HandJointType[]all HandJointType values in declaration (and therefore index) order

HandJointTypeExtensions

static class
public static class HandJointTypeExtensions // AR51.Unity.SDK
MethodReturnsDescription
IsTip(this HandJointType type)booltrue if the joint is a fingertip (ThumbTip, IndexTip, MiddleTip, RingTip, LittleTip)

JointSequence

static class
public static class JointSequence // AR51.Unity.SDK

Returns per-finger joint orderings, base-to-tip. Useful for drawing or iterating a single finger.

MethodSequence (base → tip)
GetThumbSequence()Trapezium → MetaCarpal → Proximal → Distal → Tip
GetIndexSequence()Proximal → Intermediate → Distal → Tip
GetMiddleSequence()Proximal → Intermediate → Distal → Tip
GetRingSequence()Proximal → Intermediate → Distal → Tip
GetPinkySequence()LittleMetaCarpal → Proximal → Intermediate → Distal → Tip

Each returns HandJointType[].

Exampleinferred
HandJointInfo[] joints = adapter.GetRightJointInfos();

foreach (HandJointType jt in JointSequence.GetIndexSequence())
{
HandJointInfo j = joints[(int)jt]; // index == (int)HandJointType
// draw j.Position … (Unity world meters)
}

HandsAdapterExtensions

static class
public static class HandsAdapterExtensions // AR51.Unity.SDK.Utilities

Convenience helpers for retrieving and uniformly scaling hand joints about the wrist. The ScaleJoints* overloads extend IHandsAdapter; ApplyScale extends a HandJointInfo[].

MethodReturnsDescription
ScaleJointsLeft(this IHandsAdapter adapter, float scale)HandJointInfo[]gets the left-hand joints and returns them scaled by scale about the wrist
ScaleJointsRight(this IHandsAdapter adapter, float scale)HandJointInfo[]same for the right hand
ApplyScale(this HandJointInfo[] joints, float scale)HandJointInfo[]uniformly scales all joint positions by scale around a wrist-anchored frame (built from wrist, index-proximal, little-proximal). Returns the input unchanged if null/empty. ⚠️ mutates the passed array in place (also returns it); requires a full, index-ordered joint array

HandJointTypeMapping

static class
public static class HandJointTypeMapping // AR51.Unity.SDK.Utilities

Maps SDK hand joints to Unity's HumanBodyBones for driving a humanoid Animator.

MethodReturnsDescription
ToHumanBodyBones(this HandJointType joint, HandType hand)HumanBodyBonesthe matching humanoid bone for the given joint and hand
ToRightHumanBodyBones(this HandJointType joint)HumanBodyBonesright-hand mapping. Throws ArgumentOutOfRangeException for an unmapped joint (e.g. any *Tip). Some joints collapse onto RightHand (Wrist, ThumbTrapezium, LittleMetaCarpal)
ToLeftHumanBodyBones(this HandJointType joint)HumanBodyBonesleft-hand equivalent, same behavior

AnimatorHandsExtensions

static class
public static class AnimatorHandsExtensions // AR51.Unity.SDK.Utilities

Helpers for pulling hand/finger bone Transforms off a humanoid Animator.

MethodReturnsDescription
GetBoneTransformChild(this Animator animator, HumanBodyBones bone)Transformthe first child transform of the given humanoid bone. Throws NullReferenceException if the bone is missing or has no children
GetHandJoints(this Animator animator, HandType hand)Transform[]the hand's joint transforms (delegates to the left/right variant)
GetRightHandJoints(this Animator animator)Transform[]17 right-hand joint transforms in SDK joint order (wrist + per-finger phalanges; tips omitted). Requires a humanoid rig with the mapped bones present
GetLeftHandJoints(this Animator animator)Transform[]left-hand equivalent
GetQuestRightFingerJoints(this Animator animator)Transform[]right-hand finger transforms in Oculus Quest finger-tracking order. Tips are resolved as GetChild(0) of the distal bone, so the rig must have those leaf transforms
GetQuestLeftFingerJoints(this Animator animator)Transform[]left-hand equivalent

See also

  • AdaptersIHandsAdapter / HandsAdapterFactory that produce the HandJointInfo[] documented here
  • Scene components — in-scene hand adapters that report assigned Transforms as HandJointInfo
  • Extensions — other SDK extension helpers
  • Class index — all Unity SDK types
Was this page helpful?