Ejemplo n.º 1
0
        void Start()
        {
            if (testRagdoll != null)
            {
                if (Ragdoll.BoneIsPhysicsBone(boneToHang))
                {
                    RigidbodyHangPoint hangPoint = gameObject.AddComponent <RigidbodyHangPoint>();

                    hangPoint.calculateOffset = calculateOffset;
                    hangPoint.freeRotation    = freeRotation;
                    hangPoint.anchorOffset    = anchorOffset;
                    hangPoint.rigidbodyToHang = testRagdoll.GetBone(boneToHang).rigidbody;
                }

                else
                {
                    Debug.LogError(boneToHang + " Is not a ragdoll physics bone");
                }
            }
        }