Beispiel #1
0
        void InitHand(HandModel hand)
        {
            hand.allTransforms = AvatarHelpers.GetAllTransforms(hand);
            hand.bones         = AvatarHelpers.GetHandBones(hand);

            AvatarHelpers.UpdateFingerLengths(hand, hand.proxyHand.scale);
        }
Beispiel #2
0
        protected void Awake()
        {
            // Fingers

            if (fingers == null || fingers.Length == 0)
            {
                AvatarHelpers.HandModelInit(this);
            }

            // Bones

            bones = AvatarHelpers.GetHandBones(this);

            // Transforms (depends on .bones)

            allTransforms = AvatarHelpers.GetAllTransforms(this);
        }
Beispiel #3
0
        protected void Awake()
        {
            // Fingers

            if (fingers == null || fingers.Length == 0)
            {
                List <FingerModel> fingerList = new List <FingerModel>();

                if (thumb)
                {
                    fingerList.Add(thumb);
                }
                if (index)
                {
                    fingerList.Add(index);
                }
                if (middle)
                {
                    fingerList.Add(middle);
                }
                if (ring)
                {
                    fingerList.Add(ring);
                }
                if (pinky)
                {
                    fingerList.Add(pinky);
                }

                fingers = fingerList.ToArray();
            }

            for (int i = 0; i < fingers.Length; i++)
            {
                fingers[i].hand = this;
            }

            // Bones

            bones = AvatarHelpers.GetHandBones(this);

            // Transforms (depends on .bones)

            allTransforms = AvatarHelpers.GetAllTransforms(this);
        }