// apply transforms extracted from actor mocap data to bones
        public static void ApplyMotion(NeuronActor actor, Transform[] transforms, ref int last_evaluate_time, Vector3[] bonePositionOffsets, Vector3[] boneRotationOffsets)
        {
            float swap_ratio = CalculateSwapRatio(actor.timeStamp, ref last_evaluate_time);

            if (swap_ratio < 0.0f)
            {
                return;
            }

            // apply Hips position
            SetPosition(transforms, NeuronBones.Hips, actor.GetReceivedPosition(NeuronBones.Hips), swap_ratio);
            SetRotation(transforms, NeuronBones.Hips, actor.GetReceivedRotation(NeuronBones.Hips), swap_ratio);

            // apply positions
            if (actor.withDisplacement)
            {
                for (int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i)
                {
                    SetPosition(transforms, (NeuronBones)i, actor.GetReceivedPosition((NeuronBones)i) + bonePositionOffsets[i], swap_ratio);
                    SetRotation(transforms, (NeuronBones)i, actor.GetReceivedRotation((NeuronBones)i) + boneRotationOffsets[i], swap_ratio);
                }
            }
            else
            {
                // apply rotations
                for (int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i)
                {
                    SetRotation(transforms, (NeuronBones)i, actor.GetReceivedRotation((NeuronBones)i), swap_ratio);
                }
            }
        }
Exemple #2
0
        // apply transforms extracted from actor mocap data to bones
        public static void ApplyMotion(NeuronActor actor, Transform[] transforms, Vector3[] bonePositionOffsets, Vector3[] boneRotationOffsets)
        {
            // apply Hips position
            SetPosition(transforms, NeuronBones.Hips, actor.GetReceivedPosition(NeuronBones.Hips));
            SetRotation(transforms, NeuronBones.Hips, actor.GetReceivedRotation(NeuronBones.Hips));

            // apply positions
            if (actor.withDisplacement)
            {
                //Debug.Log("With Position");
                for (int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i)
                {
                    SetPosition(transforms, (NeuronBones)i, actor.GetReceivedPosition((NeuronBones)i) + bonePositionOffsets[i]);
                    SetRotation(transforms, (NeuronBones)i, actor.GetReceivedRotation((NeuronBones)i) + boneRotationOffsets[i]);
                }
            }
            else
            {
                //Debug.Log("Without Position");
                // apply rotations
                for (int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i)
                {
                    SetRotation(transforms, (NeuronBones)i, actor.GetReceivedRotation((NeuronBones)i));
                }
            }
        }
        // apply transforms extracted from actor mocap data to bones
        public static void ApplyMotion(NeuronActor actor, Transform[] transforms, Vector3[] bonePositionOffsets, Vector3[] boneRotationOffsets)
        {
            // apply Hips position
            SetPosition(transforms, InertialBones.Hips, actor.GetReceivedPosition((NeuronBones)InertialBones.Hips));
            SetRotation(transforms, InertialBones.Hips, actor.GetReceivedRotation((NeuronBones)InertialBones.Hips));

            // apply positions
            if (actor.withDisplacement)
            {
                for (int i = 1; i < (int)InertialBones.NumOfBones && i < transforms.Length; ++i)
                {
                    SetPosition(transforms, (InertialBones)i, actor.GetReceivedPosition((NeuronBones)i) + bonePositionOffsets[i]);
                    SetRotation(transforms, (InertialBones)i, actor.GetReceivedRotation((NeuronBones)i) + boneRotationOffsets[i]);
                }
                //for (int i = 0; i < (int)InertialBones.NumOfBones; i++)
                //{
                //    SetPosition(transforms, (InertialBones)i, actor.GetReceivedPosition((NeuronBones)i));
                //}
                //for (int i = 0; i < (int)InertialBones.NumOfBones; i++)
                //{
                //    SetRotation(transforms, (InertialBones)i, actor.GetReceivedRotation((NeuronBones)i));
                //}
            }
            else
            {
                // apply rotations
                for (int i = 1; i < (int)InertialBones.NumOfBones && i < transforms.Length; ++i)
                {
                    SetRotation(transforms, (InertialBones)i, actor.GetReceivedRotation((NeuronBones)i));
                }
            }
        }
        // apply transforms extracted from actor mocap data to bones
        public static void ApplyMotion(NeuronActor actor, Transform[] transforms, Vector3[] bonePositionOffsets, Vector3[] boneRotationOffsets, float hipOffset)
        {
            // apply Hips position
            Vector3 hipPos = actor.GetReceivedPosition(NeuronBones.Hips);

            SetPosition(transforms, NeuronBones.Hips, new Vector3(hipPos.x, hipPos.y + hipOffset, hipPos.z));               // actor.GetReceivedPosition( NeuronBones.Hips ) );
            SetRotation(transforms, NeuronBones.Hips, actor.GetReceivedRotation(NeuronBones.Hips));

            // apply positions
            if (actor.withDisplacement)
            {
                for (int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i)
                {
                    //	SetPosition( transforms, (NeuronBones)i, actor.GetReceivedPosition( (NeuronBones)i ));// + bonePositionOffsets[i] );
                    SetRotation(transforms, (NeuronBones)i, actor.GetReceivedRotation((NeuronBones)i));                       // + boneRotationOffsets[i] );
                }
            }
            else
            {
                // apply rotations
                for (int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i)
                {
                    SetRotation(transforms, (NeuronBones)i, actor.GetReceivedRotation((NeuronBones)i));
                }
            }
        }
        // apply transforms extracted from actor mocap data to bones
        public static void ApplyMotion(NeuronActor actor, Transform[] transforms, Vector3[] bonePositionOffsets, Vector3[] boneRotationOffsets, bool enableHipMove, Quaternion[] orignalRot = null, Quaternion[] orignalParentRot = null)
        {
            // apply Hips position
            if (enableHipMove)
            {
                SetPosition(transforms, NeuronBones.Hips, actor.GetReceivedPosition(NeuronBones.Hips));
            }
            else
            {
                Vector3 p = actor.GetReceivedPosition(NeuronBones.Hips);
                SetPosition(transforms, NeuronBones.Hips, new Vector3(0f, p.y, 0f));
            }

            SetRotation(transforms, NeuronBones.Hips,
                        (Quaternion.Euler(actor.GetReceivedRotation(NeuronBones.Hips)) * orignalRot[(int)NeuronBones.Hips]).eulerAngles);


            // apply positions
            if (actor.withDisplacement)
            {
                for (int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i)
                {
                    if (transforms[i] == null)
                    {
                        continue;
                    }

                    // q
                    Quaternion orignalBoneRot = Quaternion.identity;
                    if (orignalRot != null)
                    {
                        orignalBoneRot = orignalRot[i];
                    }
                    Vector3    rot  = actor.GetReceivedRotation((NeuronBones)i) + boneRotationOffsets[i];
                    Quaternion srcQ = Quaternion.Euler(rot);

                    Quaternion usedQ      = Quaternion.Inverse(orignalParentRot[i]) * srcQ * orignalParentRot[i];
                    Vector3    transedRot = usedQ.eulerAngles;
                    Quaternion finalBoneQ = Quaternion.Euler(transedRot) * orignalBoneRot;
                    SetRotation(transforms, (NeuronBones)i, finalBoneQ.eulerAngles);

                    // p
                    Vector3 srcP   = actor.GetReceivedPosition((NeuronBones)i) + bonePositionOffsets[i];
                    Vector3 finalP = Quaternion.Inverse(orignalParentRot[i]) * srcP;
                    SetPosition(transforms, (NeuronBones)i, finalP);
                    //  SetPosition( transforms, (NeuronBones)i, actor.GetReceivedPosition( (NeuronBones)i ) + bonePositionOffsets[i] );
                    //	SetRotation( transforms, (NeuronBones)i, actor.GetReceivedRotation( (NeuronBones)i ) + boneRotationOffsets[i] );
                }
            }
            else
            {
                // apply rotations
                for (int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i)
                {
                    if (transforms[i] == null)
                    {
                        continue;
                    }
                    Quaternion orignalBoneRot = Quaternion.identity;
                    if (/*testUnityChan && */ orignalRot != null)
                    {
                        orignalBoneRot = orignalRot[i];
                    }
                    Vector3    rot  = actor.GetReceivedRotation((NeuronBones)i);
                    Quaternion srcQ = Quaternion.Euler(rot);

                    //// Test
                    //rot = tempSource.transforms[i].localRotation.eulerAngles;
                    //Quaternion srcQ = tempSource.transforms[i].localRotation;
                    //// Test end

                    Quaternion usedQ      = Quaternion.Inverse(orignalParentRot[i]) * srcQ * orignalParentRot[i];
                    Vector3    transedRot = usedQ.eulerAngles;
                    Quaternion finalBoneQ = Quaternion.Euler(transedRot) * orignalBoneRot;
                    SetRotation(transforms, (NeuronBones)i, finalBoneQ.eulerAngles);
                }
            }
        }
		// apply transforms extracted from actor mocap data to bones
		public static void ApplyMotion( NeuronActor actor, Transform[] transforms, ref int last_evaluate_time, Vector3[] bonePositionOffsets, Vector3[] boneRotationOffsets )
		{		
			float swap_ratio = CalculateSwapRatio( actor.timeStamp, ref last_evaluate_time );
			if( swap_ratio < 0.0f )
			{
				return;
			}
			
			// apply Hips position
			SetPosition( transforms, NeuronBones.Hips, actor.GetReceivedPosition( NeuronBones.Hips ), swap_ratio );
			SetRotation( transforms, NeuronBones.Hips, actor.GetReceivedRotation( NeuronBones.Hips ), swap_ratio );
			
			// apply positions
			if( actor.withDisplacement )
			{
				for( int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i )
				{
					SetPosition( transforms, (NeuronBones)i, actor.GetReceivedPosition( (NeuronBones)i ) + bonePositionOffsets[i], swap_ratio );
					SetRotation( transforms, (NeuronBones)i, actor.GetReceivedRotation( (NeuronBones)i ) + boneRotationOffsets[i], swap_ratio );
				}
			}
			else
			{
				// apply rotations
				for( int i = 1; i < (int)NeuronBones.NumOfBones && i < transforms.Length; ++i )
				{
					SetRotation( transforms, (NeuronBones)i, actor.GetReceivedRotation( (NeuronBones)i ), swap_ratio );
				}
			}
		}
	// apply transforms extracted from actor mocap data to transforms of animator bones
	public static void ApplyMotion( NeuronActor actor, Animator animator, ref int last_evaluate_time, Vector3[] positionOffsets, Vector3[] rotationOffsets )
	{
		float swap_ratio = CalculateSwapRatio( actor.timeStamp, ref last_evaluate_time );
		if( swap_ratio <= 0.0f )
		{
			return;
		}
		
		// apply Hips position
		SetPosition( animator, HumanBodyBones.Hips, actor.GetReceivedPosition( NeuronBones.Hips ) + positionOffsets[(int)HumanBodyBones.Hips], swap_ratio );
		SetRotation( animator, HumanBodyBones.Hips, actor.GetReceivedRotation( NeuronBones.Hips ), swap_ratio );
		
		// apply positions
		if( actor.withDisplacement )
		{
			// legs
			SetPosition( animator, HumanBodyBones.RightUpperLeg,			actor.GetReceivedPosition( NeuronBones.RightUpLeg ) + positionOffsets[(int)HumanBodyBones.RightUpperLeg], swap_ratio );
			SetPosition( animator, HumanBodyBones.RightLowerLeg, 			actor.GetReceivedPosition( NeuronBones.RightLeg ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightFoot, 				actor.GetReceivedPosition( NeuronBones.RightFoot ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftUpperLeg,				actor.GetReceivedPosition( NeuronBones.LeftUpLeg ) + positionOffsets[(int)HumanBodyBones.LeftUpperLeg], swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftLowerLeg,				actor.GetReceivedPosition( NeuronBones.LeftLeg ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftFoot,					actor.GetReceivedPosition( NeuronBones.LeftFoot ), swap_ratio );
			
			// spine
			SetPosition( animator, HumanBodyBones.Spine,					actor.GetReceivedPosition( NeuronBones.Spine ), swap_ratio );
			SetPosition( animator, HumanBodyBones.Chest,					actor.GetReceivedPosition( NeuronBones.Spine3 ), swap_ratio ); 
			SetPosition( animator, HumanBodyBones.Neck,						actor.GetReceivedPosition( NeuronBones.Neck ), swap_ratio );
			SetPosition( animator, HumanBodyBones.Head,						actor.GetReceivedPosition( NeuronBones.Head ), swap_ratio );
			
			// right arm
			SetPosition( animator, HumanBodyBones.RightShoulder,			actor.GetReceivedPosition( NeuronBones.RightShoulder ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightUpperArm,			actor.GetReceivedPosition( NeuronBones.RightArm ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightLowerArm,			actor.GetReceivedPosition( NeuronBones.RightForeArm ), swap_ratio );
			
			// right hand
			SetPosition( animator, HumanBodyBones.RightHand,				actor.GetReceivedPosition( NeuronBones.RightHand ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightThumbProximal,		actor.GetReceivedPosition( NeuronBones.RightHandThumb1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightThumbIntermediate,	actor.GetReceivedPosition( NeuronBones.RightHandThumb2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightThumbDistal,			actor.GetReceivedPosition( NeuronBones.RightHandThumb3 ), swap_ratio );
			
			SetPosition( animator, HumanBodyBones.RightIndexProximal,		actor.GetReceivedPosition( NeuronBones.RightHandIndex1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightIndexIntermediate,	actor.GetReceivedPosition( NeuronBones.RightHandIndex2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightIndexDistal,			actor.GetReceivedPosition( NeuronBones.RightHandIndex3 ), swap_ratio );
			
			SetPosition( animator, HumanBodyBones.RightMiddleProximal,		actor.GetReceivedPosition( NeuronBones.RightHandMiddle1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightMiddleIntermediate,	actor.GetReceivedPosition( NeuronBones.RightHandMiddle2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightMiddleDistal,		actor.GetReceivedPosition( NeuronBones.RightHandMiddle3 ), swap_ratio );
			
			SetPosition( animator, HumanBodyBones.RightRingProximal,		actor.GetReceivedPosition( NeuronBones.RightHandRing1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightRingIntermediate,	actor.GetReceivedPosition( NeuronBones.RightHandRing2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightRingDistal,			actor.GetReceivedPosition( NeuronBones.RightHandRing3 ), swap_ratio );
			
			SetPosition( animator, HumanBodyBones.RightLittleProximal,		actor.GetReceivedPosition( NeuronBones.RightHandPinky1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightLittleIntermediate,	actor.GetReceivedPosition( NeuronBones.RightHandPinky2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.RightLittleDistal,		actor.GetReceivedPosition( NeuronBones.RightHandPinky3 ), swap_ratio );
			
			// left arm
			SetPosition( animator, HumanBodyBones.LeftShoulder,				actor.GetReceivedPosition( NeuronBones.LeftShoulder ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftUpperArm,				actor.GetReceivedPosition( NeuronBones.LeftArm ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftLowerArm,				actor.GetReceivedPosition( NeuronBones.LeftForeArm ), swap_ratio );
			
			// left hand
			SetPosition( animator, HumanBodyBones.LeftHand,					actor.GetReceivedPosition( NeuronBones.LeftHand ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftThumbProximal,		actor.GetReceivedPosition( NeuronBones.LeftHandThumb1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftThumbIntermediate,	actor.GetReceivedPosition( NeuronBones.LeftHandThumb2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftThumbDistal,			actor.GetReceivedPosition( NeuronBones.LeftHandThumb3 ), swap_ratio );
			
			SetPosition( animator, HumanBodyBones.LeftIndexProximal,		actor.GetReceivedPosition( NeuronBones.LeftHandIndex1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftIndexIntermediate,	actor.GetReceivedPosition( NeuronBones.LeftHandIndex2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftIndexDistal,			actor.GetReceivedPosition( NeuronBones.LeftHandIndex3 ), swap_ratio );
			
			SetPosition( animator, HumanBodyBones.LeftMiddleProximal,		actor.GetReceivedPosition( NeuronBones.LeftHandMiddle1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftMiddleIntermediate,	actor.GetReceivedPosition( NeuronBones.LeftHandMiddle2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftMiddleDistal,			actor.GetReceivedPosition( NeuronBones.LeftHandMiddle3 ), swap_ratio );
			
			SetPosition( animator, HumanBodyBones.LeftRingProximal,			actor.GetReceivedPosition( NeuronBones.LeftHandRing1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftRingIntermediate,		actor.GetReceivedPosition( NeuronBones.LeftHandRing2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftRingDistal,			actor.GetReceivedPosition( NeuronBones.LeftHandRing3 ), swap_ratio );
			
			SetPosition( animator, HumanBodyBones.LeftLittleProximal,		actor.GetReceivedPosition( NeuronBones.LeftHandPinky1 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftLittleIntermediate,	actor.GetReceivedPosition( NeuronBones.LeftHandPinky2 ), swap_ratio );
			SetPosition( animator, HumanBodyBones.LeftLittleDistal,			actor.GetReceivedPosition( NeuronBones.LeftHandPinky3 ), swap_ratio );
		}
		
		// apply rotations
		
		// legs
		SetRotation( animator, HumanBodyBones.RightUpperLeg,			actor.GetReceivedRotation( NeuronBones.RightUpLeg ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightLowerLeg, 			actor.GetReceivedRotation( NeuronBones.RightLeg ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightFoot, 				actor.GetReceivedRotation( NeuronBones.RightFoot ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftUpperLeg,				actor.GetReceivedRotation( NeuronBones.LeftUpLeg ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftLowerLeg,				actor.GetReceivedRotation( NeuronBones.LeftLeg ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftFoot,					actor.GetReceivedRotation( NeuronBones.LeftFoot ), swap_ratio );
		
		// spine
		SetRotation( animator, HumanBodyBones.Spine,					actor.GetReceivedRotation( NeuronBones.Spine ), swap_ratio );
		SetRotation( animator, HumanBodyBones.Chest,					actor.GetReceivedRotation( NeuronBones.Spine1 ) + actor.GetReceivedRotation( NeuronBones.Spine2 ) + actor.GetReceivedRotation( NeuronBones.Spine3 ), swap_ratio ); 
		SetRotation( animator, HumanBodyBones.Neck,						actor.GetReceivedRotation( NeuronBones.Neck ), swap_ratio );
		SetRotation( animator, HumanBodyBones.Head,						actor.GetReceivedRotation( NeuronBones.Head ), swap_ratio );
		
		// right arm
		SetRotation( animator, HumanBodyBones.RightShoulder,			actor.GetReceivedRotation( NeuronBones.RightShoulder ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightUpperArm,			actor.GetReceivedRotation( NeuronBones.RightArm ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightLowerArm,			actor.GetReceivedRotation( NeuronBones.RightForeArm ), swap_ratio );
		
		// right hand
		SetRotation( animator, HumanBodyBones.RightHand,				actor.GetReceivedRotation( NeuronBones.RightHand ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightThumbProximal,		actor.GetReceivedRotation( NeuronBones.RightHandThumb1 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightThumbIntermediate,	actor.GetReceivedRotation( NeuronBones.RightHandThumb2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightThumbDistal,			actor.GetReceivedRotation( NeuronBones.RightHandThumb3 ), swap_ratio );
		
		SetRotation( animator, HumanBodyBones.RightIndexProximal,		actor.GetReceivedRotation( NeuronBones.RightHandIndex1 ) + actor.GetReceivedRotation( NeuronBones.RightInHandIndex ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightIndexIntermediate,	actor.GetReceivedRotation( NeuronBones.RightHandIndex2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightIndexDistal,			actor.GetReceivedRotation( NeuronBones.RightHandIndex3 ), swap_ratio );
		
		SetRotation( animator, HumanBodyBones.RightMiddleProximal,		actor.GetReceivedRotation( NeuronBones.RightHandMiddle1 ) + actor.GetReceivedRotation( NeuronBones.RightInHandMiddle ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightMiddleIntermediate,	actor.GetReceivedRotation( NeuronBones.RightHandMiddle2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightMiddleDistal,		actor.GetReceivedRotation( NeuronBones.RightHandMiddle3 ), swap_ratio );
		
		SetRotation( animator, HumanBodyBones.RightRingProximal,		actor.GetReceivedRotation( NeuronBones.RightHandRing1 ) + actor.GetReceivedRotation( NeuronBones.RightInHandRing ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightRingIntermediate,	actor.GetReceivedRotation( NeuronBones.RightHandRing2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightRingDistal,			actor.GetReceivedRotation( NeuronBones.RightHandRing3 ), swap_ratio );
		
		SetRotation( animator, HumanBodyBones.RightLittleProximal,		actor.GetReceivedRotation( NeuronBones.RightHandPinky1 ) + actor.GetReceivedRotation( NeuronBones.RightInHandPinky ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightLittleIntermediate,	actor.GetReceivedRotation( NeuronBones.RightHandPinky2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.RightLittleDistal,		actor.GetReceivedRotation( NeuronBones.RightHandPinky3 ), swap_ratio );
		
		// left arm
		SetRotation( animator, HumanBodyBones.LeftShoulder,				actor.GetReceivedRotation( NeuronBones.LeftShoulder ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftUpperArm,				actor.GetReceivedRotation( NeuronBones.LeftArm ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftLowerArm,				actor.GetReceivedRotation( NeuronBones.LeftForeArm ), swap_ratio );
		
		// left hand
		SetRotation( animator, HumanBodyBones.LeftHand,					actor.GetReceivedRotation( NeuronBones.LeftHand ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftThumbProximal,		actor.GetReceivedRotation( NeuronBones.LeftHandThumb1 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftThumbIntermediate,	actor.GetReceivedRotation( NeuronBones.LeftHandThumb2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftThumbDistal,			actor.GetReceivedRotation( NeuronBones.LeftHandThumb3 ), swap_ratio );
		
		SetRotation( animator, HumanBodyBones.LeftIndexProximal,		actor.GetReceivedRotation( NeuronBones.LeftHandIndex1 ) + actor.GetReceivedRotation( NeuronBones.LeftInHandIndex ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftIndexIntermediate,	actor.GetReceivedRotation( NeuronBones.LeftHandIndex2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftIndexDistal,			actor.GetReceivedRotation( NeuronBones.LeftHandIndex3 ), swap_ratio );
		
		SetRotation( animator, HumanBodyBones.LeftMiddleProximal,		actor.GetReceivedRotation( NeuronBones.LeftHandMiddle1 ) + actor.GetReceivedRotation( NeuronBones.LeftInHandMiddle ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftMiddleIntermediate,	actor.GetReceivedRotation( NeuronBones.LeftHandMiddle2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftMiddleDistal,			actor.GetReceivedRotation( NeuronBones.LeftHandMiddle3 ), swap_ratio );
		
		SetRotation( animator, HumanBodyBones.LeftRingProximal,			actor.GetReceivedRotation( NeuronBones.LeftHandRing1 ) + actor.GetReceivedRotation( NeuronBones.LeftInHandRing ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftRingIntermediate,		actor.GetReceivedRotation( NeuronBones.LeftHandRing2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftRingDistal,			actor.GetReceivedRotation( NeuronBones.LeftHandRing3 ), swap_ratio );
		
		SetRotation( animator, HumanBodyBones.LeftLittleProximal,		actor.GetReceivedRotation( NeuronBones.LeftHandPinky1 ) + actor.GetReceivedRotation( NeuronBones.LeftInHandPinky ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftLittleIntermediate,	actor.GetReceivedRotation( NeuronBones.LeftHandPinky2 ), swap_ratio );
		SetRotation( animator, HumanBodyBones.LeftLittleDistal,			actor.GetReceivedRotation( NeuronBones.LeftHandPinky3 ), swap_ratio );		
	}