The Arm Gesture Control Rig
Arm gesture positions are controlled by procedural IK using the built in Mecanim IK. It uses a special rig that controls the hand IK goals that yields a more natural curve and less linear transition between hand IK goal position as the rig transits from pose to pose. This IK ArmControlRig per arm consists of a root transform positioned to the root of the upper arm bone. The Rotator transform is a child of this and allows front to back and up and down rotation. The Extender transform is a child of the Rotator and moves the HandIKGoal in and out along the Rotator transform z axis.
The basic theory is that the Arm IK Rig controls the positioning of the Hand IK Goal of the arm and uses the Unity Mecanim IK system to rotate the shoulder and elbow joints so that the wrist meets the Hand IK Goal position. The Arm IK Control Rig root is set to the shoulder bone pivot keeping its Y axis to the local shoulder up and the Z axis to the local shoulder forward, regardless of the shoulder bone’s current rotation. A Rotator transform is made the child of the Arm IK Control Rig root. This transform can be rotated front to back and up to down offering the full range of arm motion. The Hand IK Goal is a child of this and slides inward and outwards along the Z axis of the Rotator transform. This IK control setup allows a non linear and more natural motion than simply moving an IK Goal from position to position.
This IK controller setup is found in the SILVIA Avatar Hierarchy under: PelvicGoal/PelvicTarget/ProceduralGestureControlRig/LeftArmControlRig & RightArmControlRig.
The Elbow Hints per arm are pre-calculated. A triangle is constructed from the shoulder elbow and wrist positions. The base of the triangle is the shoulder to wrist line. This is bisected and a line drawn from the bisection point through the apex of the triangle at the elbow. This triangle constructs a plane and the Elbow Hint lies on this plane offset from the apex approximately the same distance as the base to apex distance. This provides the arm stability. In some gestures the elbow may need to be pulled in, out or raised, lowered etc to conform properly to the meaning of the gesture being created or edited. The default offset calculated as described above is offset further by use of the Right and Left Elbow Hint Midline In Out and Elbow Hint Elevation.
Control of the root of the fingers is achieved by sliders which set finger spread and curl, combined with a single slider to curl the remaining bones in each finger chain deliver the full gamut of hand positions.