15 [Header(
"Projection")]
18 [Tooltip(
"The scale of the projection of any hand distance from the approximated "
19 +
"shoulder beyond the handMergeDistance.")]
23 [Tooltip(
"The distance from the approximated shoulder beyond which any additional "
24 +
"distance is exponentiated by the projectionExponent.")]
32 var shoulderBasis = Quaternion.LookRotation(
36 foreach (var hand
in inputFrame.Hands) {
38 Vector3 shoulderPos = headPos
39 + (shoulderBasis * (
new Vector3(0f, -0.13f, -0.1f)
40 + Vector3.left * 0.15f * (hand.IsLeft ? 1f : -1f)));
44 Vector3 shoulderToHand = hand.PalmPosition.ToVector3() - shoulderPos;
45 float handShoulderDist = shoulderToHand.magnitude;
48 hand.SetTransform(shoulderPos + shoulderToHand * projectionAmount,
49 hand.Rotation.ToQuaternion());
The Frame class represents a set of hand and finger tracking data detected in a single frame.
override void ProcessFrame(ref Frame inputFrame)