Ejemplo n.º 1
0
    public FingerFKJoints GetFingerByName(string n)
    {
        FingerFKJoints f = null;

        foreach (FingerFKJoints fkj in fingerJoints)
        {
            if (fkj.name == n)
            {
                f = fkj;
            }
        }
        return(f);
    }
Ejemplo n.º 2
0
    void UpdateFinger(FingerFKJoints joint)
    {
        if (!joint.enable)
        {
            return;
        }
        if (joint.doBase)
        {
            joint.proximal.localEulerAngles = ((joint.baseCopyJoints ? (joint.angleJoint / joint.influenceBase) : (joint.angleBase)) * joint.rotationAxisBase);
            joint.proximal.Rotate(joint.rotationOffsetBase);
        }

        joint.midal.localEulerAngles = (joint.angleJoint * joint.rotationAxis);
        joint.midal.Rotate(joint.rotationOffset + joint.midalRotationOffset);



        joint.distal.localEulerAngles = (joint.angleJoint * joint.rotationAxis);
        joint.distal.Rotate(joint.rotationOffset);
    }