private void Start()
        {
            model.proxyHand.relatedHandlers.Add(this);


            slaveBones = AvatarHelpers.GetSlaveHandBones(model.proxyHand.slave);

            // Ignore palm-finger collisions
            for (int i = 0; i < slaveBones.Length; i++)
            {
                if (!slaveBones[i].colliderRef)
                {
                    continue;
                }

                Physics.IgnoreCollision((model.proxyHand.slave.wrist as SlaveBoneModel).colliderRef, slaveBones[i].colliderRef, true);
            }

            // Set default configuration if needed
            if (model.configuration == null)
            {
                model.configuration = core.model.defaultHandPhysicsConfiguration;
            }

            for (int i = 0; i < slaveBones.Length; i++)
            {
                if (!slaveBones[i].jointRef)
                {
                    continue;
                }

                // Get initial connected body local rotations
                if (slaveBones[i].jointRef.connectedBody != null)
                {
                    slaveBones[i].initialConnectedBodyLocalRotation = slaveBones[i].jointRef.connectedBody.transform.localRotation;
                }
                else
                {
                    slaveBones[i].initialConnectedBodyLocalRotation = slaveBones[i].jointRef.transform.rotation;
                }

                // Set initial joint configurations
                if (slaveBones[i] == model.proxyHand.slave.wrist)
                {
                    PhysHelpers.SetSlaveBoneConfiguration(slaveBones[i].jointRef, model.configuration.wrist);
                }
                else if (slaveBones[i].isSpecial)
                {
                    PhysHelpers.SetSlaveBoneConfiguration(slaveBones[i].jointRef, model.configuration.specials);
                }
                else
                {
                    PhysHelpers.SetSlaveBoneConfiguration(slaveBones[i].jointRef, model.configuration.fingers);
                }

                slaveBones[i].rigidbodyRef.maxDepenetrationVelocity = model.configuration.fingers.maxLinearVelocity;
                slaveBones[i].rigidbodyRef.maxAngularVelocity       = model.configuration.fingers.maxAngularVelocity;
            }
        }
        private void Start()
        {
            model.proxyHand.relatedHandlers.Add(this);

            slaveBones = AvatarHelpers.GetSlaveHandBones(model.proxyHand.slave);

            // Set default configuration if needed
            if (model.asset == null)
            {
                model.asset = BasicHelpers.FindScriptableObject <HandPhysicsConfigurationAsset>(core.model.defaultConfAssets);
            }

            // Make configuration editable
            model.configuration = new HandPhysicsConfiguration(model.asset.configuration);

            for (int i = 0; i < slaveBones.Length; i++)
            {
                if (slaveBones[i].colliderRef)
                {
                    // Ignore palm-finger collisions
                    Physics.IgnoreCollision((model.proxyHand.slave.wrist as SlaveBoneModel).colliderRef, slaveBones[i].colliderRef, true);
                }

                if (slaveBones[i].jointRef)
                {
                    // Get initial connected body local rotations and conn anchors
                    if (slaveBones[i].jointRef.connectedBody != null)
                    {
                        slaveBones[i].initialConnectedBodyLocalRotation     = slaveBones[i].jointRef.connectedBody.transform.localRotation;
                        slaveBones[i].initialConnectedAnchor                = slaveBones[i].jointRef.connectedAnchor;
                        slaveBones[i].jointRef.autoConfigureConnectedAnchor = false;
                    }
                    else
                    {
                        slaveBones[i].initialConnectedBodyLocalRotation = slaveBones[i].jointRef.transform.rotation;
                    }

                    // Set initial joint configurations
                    if (slaveBones[i] == model.proxyHand.slave.wrist)
                    {
                        PhysHelpers.SetSlaveBoneConfiguration(slaveBones[i].jointRef, model.configuration.wrist);
                    }
                    else if (slaveBones[i].isSpecial)
                    {
                        PhysHelpers.SetSlaveBoneConfiguration(slaveBones[i].jointRef, model.configuration.specials);
                    }
                    else
                    {
                        PhysHelpers.SetSlaveBoneConfiguration(slaveBones[i].jointRef, model.configuration.fingers);
                    }

                    // Initial built-in velocity clamps
                    slaveBones[i].rigidbodyRef.maxDepenetrationVelocity = model.configuration.fingers.maxLinearVelocity;
                    slaveBones[i].rigidbodyRef.maxAngularVelocity       = model.configuration.fingers.maxAngularVelocity;
                }
            }
        }