예제 #1
0
        private void ToesConfigurationInspector(ref FootTarget.TargetedToesBone toes, bool isLeft)
        {
            if (toes.bone.transform != null)
            {
                GUI.SetNextControlName(toes.bone.transform.name + "00");
            }
            toes.bone.transform = (Transform)EditorGUILayout.ObjectField("Toes Bone", toes.bone.transform, typeof(Transform), true);
            if (toes.bone.transform != null)
            {
                EditorGUI.indentLevel++;

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

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

                //if (isLeft)
                //    Target_Editor.BoneAngleInspector(toesMinX, toesMaxX, FootTarget.minLeftToesAngles.x, FootTarget.maxLeftToesAngles.x, toesXname, "X Limits");
                //else
                //    Target_Editor.BoneAngleInspector(toesMinX, toesMaxX, FootTarget.minRightToesAngles.x, FootTarget.maxRightToesAngles.x, toesXname, "X Limits");
                EditorGUI.indentLevel--;
            }
        }
예제 #2
0
        private void UpdateToesBones(FootTarget.TargetedToesBone toes)
        {
            //if (toes.bone.transform == null)
            //    return;

            //toes.bone.minAngles.x = toesMinX.floatValue;
            //toes.bone.maxAngles.x = toesMaxX.floatValue;
        }
예제 #3
0
        //private string toesXname;
        //private SerializedProperty toesMinX;
        //private SerializedProperty toesMaxX;

        private void InitToesConfiguration(FootTarget.TargetedToesBone toes)
        {
            //if (toes.bone.transform == null)
            //    return;

            //toesXname = toes.bone.transform.name + "X";
            //toesMinX = serializedObject.FindProperty("toes.bone.minAngles.x");
            //toesMaxX = serializedObject.FindProperty("toes.bone.maxAngles.x");
        }