UnityEditor.RagdollBuilder.AddJoint C# (CSharp) Method

AddJoint() private method

private AddJoint ( string name, Transform anchor, string parent, Vector3 worldTwistAxis, Vector3 worldSwingAxis, float minLimit, float maxLimit, float swingLimit, Type colliderType, float radiusScale, float density ) : void
name string
anchor UnityEngine.Transform
parent string
worldTwistAxis UnityEngine.Vector3
worldSwingAxis UnityEngine.Vector3
minLimit float
maxLimit float
swingLimit float
colliderType Type
radiusScale float
density float
return void
        private void AddJoint(string name, Transform anchor, string parent, Vector3 worldTwistAxis, Vector3 worldSwingAxis, float minLimit, float maxLimit, float swingLimit, Type colliderType, float radiusScale, float density)
        {
            BoneInfo info = new BoneInfo {
                name = name,
                anchor = anchor,
                axis = worldTwistAxis,
                normalAxis = worldSwingAxis,
                minLimit = minLimit,
                maxLimit = maxLimit,
                swingLimit = swingLimit,
                density = density,
                colliderType = colliderType,
                radiusScale = radiusScale
            };
            if (this.FindBone(parent) != null)
            {
                info.parent = this.FindBone(parent);
            }
            else if (name.StartsWith("Left"))
            {
                info.parent = this.FindBone("Left " + parent);
            }
            else if (name.StartsWith("Right"))
            {
                info.parent = this.FindBone("Right " + parent);
            }
            info.parent.children.Add(info);
            this.bones.Add(info);
        }