Esempio n. 1
0
        private void FootConfigurationInspector(ref FootTarget.TargetedFootBone foot, bool isLeft)
        {
            if (foot.bone.transform != null)
            {
                GUI.SetNextControlName(foot.bone.transform.name + "00");
            }
            foot.bone.transform = (Transform)EditorGUILayout.ObjectField("Foot Bone", foot.bone.transform, typeof(Transform), true);
            if (foot.bone.transform != null)
            {
                EditorGUI.indentLevel++;

                foot.bone.jointLimitations = EditorGUILayout.Toggle("Joint Limitations", foot.bone.jointLimitations);
                if (foot.bone.jointLimitations)
                {
                    foot.bone.maxAngle = EditorGUILayout.Slider("Max Angle", foot.bone.maxAngle, 0, 180);
                }

                //EditorGUILayout.BeginHorizontal();
                //foot.bone.maxAngle = EditorGUILayout.Slider("Max Angle", foot.bone.maxAngle, 0, 180);
                //if (GUILayout.Button("R", GUILayout.Width(20))) {
                //    foot.bone.maxAngle = FootTarget.maxFootAngle;
                //}
                //EditorGUILayout.EndHorizontal();

                //if (isLeft) {
                //    Target_Editor.BoneAngleInspector(footMinX, footMaxX, FootTarget.minLeftFootAngles.x, FootTarget.maxLeftFootAngles.x, footXname, "X Limits");
                //    Target_Editor.BoneAngleInspector(footMinZ, footMaxZ, FootTarget.minLeftFootAngles.z, FootTarget.maxLeftFootAngles.z, footZname, "Z Limits");
                //} else {
                //    Target_Editor.BoneAngleInspector(footMinX, footMaxX, FootTarget.minRightFootAngles.x, FootTarget.maxRightFootAngles.x, footXname, "X Limits");
                //    Target_Editor.BoneAngleInspector(footMinZ, footMaxZ, FootTarget.minRightFootAngles.z, FootTarget.maxRightFootAngles.z, footZname, "Z Limtis");
                //}
                EditorGUI.indentLevel--;
            }
        }
Esempio n. 2
0
        private void UpdateFootBones(FootTarget.TargetedFootBone foot)
        {
            //if (foot.bone.transform == null)
            //    return;

            //foot.bone.minAngles.x = footMinX.floatValue;
            //foot.bone.maxAngles.x = footMaxX.floatValue;

            //foot.bone.minAngles.z = footMinZ.floatValue;
            //foot.bone.maxAngles.z = footMaxZ.floatValue;
        }
Esempio n. 3
0
        //private string footXname;
        //private SerializedProperty footMinX;
        //private SerializedProperty footMaxX;

        //private string footZname;
        //private SerializedProperty footMinZ;
        //private SerializedProperty footMaxZ;

        private void InitFootConfiguration(FootTarget.TargetedFootBone foot)
        {
            //if (foot.bone.transform == null)
            //    return;

            //footXname = foot.bone.transform.name + "X";
            //footMinX = serializedObject.FindProperty("foot.bone.minAngles.x");
            //footMaxX = serializedObject.FindProperty("foot.bone.maxAngles.x");

            //footZname = foot.bone.transform.name + "Z";
            //footMinZ = serializedObject.FindProperty("foot.bone.minAngles.z");
            //footMaxZ = serializedObject.FindProperty("foot.bone.maxAngles.z");
        }