316 changed files with 52822 additions and 0 deletions
			
			
		@ -0,0 +1,6 @@ | 
				
			|||||
 | 
					{ | 
				
			||||
 | 
					  "version": "1.0", | 
				
			||||
 | 
					  "components": [ | 
				
			||||
 | 
					    "Microsoft.VisualStudio.Workload.ManagedGame" | 
				
			||||
 | 
					  ] | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 776c34a4e6c0e42488823c8f7254c194 | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 8b35c1d2ebfe61f41b1a6e407a37bf66 | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,46 @@ | 
				
			|||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using UnityEditor; | 
				
			||||
 | 
					public class FindMissingScripts : EditorWindow | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    [MenuItem("Window/FindMissingScripts")] | 
				
			||||
 | 
					    public static void ShowWindow() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        EditorWindow.GetWindow(typeof(FindMissingScripts)); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnGUI() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (GUILayout.Button("Find Missing Scripts in selected prefabs")) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            FindInSelected(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    private static void FindInSelected() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        GameObject[] go = Selection.gameObjects; | 
				
			||||
 | 
					        int go_count = 0, components_count = 0, missing_count = 0; | 
				
			||||
 | 
					        foreach (GameObject g in go) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            go_count++; | 
				
			||||
 | 
					            Component[] components = g.GetComponents<Component>(); | 
				
			||||
 | 
					            for (int i = 0; i < components.Length; i++) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                components_count++; | 
				
			||||
 | 
					                if (components[i] == null) | 
				
			||||
 | 
					                { | 
				
			||||
 | 
					                    missing_count++; | 
				
			||||
 | 
					                    string s = g.name; | 
				
			||||
 | 
					                    Transform t = g.transform; | 
				
			||||
 | 
					                    while (t.parent != null) | 
				
			||||
 | 
					                    { | 
				
			||||
 | 
					                        s = t.parent.name + "/" + s; | 
				
			||||
 | 
					                        t = t.parent; | 
				
			||||
 | 
					                    } | 
				
			||||
 | 
					                    Debug.Log(s + " has an empty script attached in position: " + i, g); | 
				
			||||
 | 
					                } | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Debug.Log(string.Format("Searched {0} GameObjects, {1} components, found {2} missing", go_count, components_count, missing_count)); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: f0d934a6bc24a4ccc82186b44f16a343 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 7ee34fd637d821c4fad00ba27a0f37d5 | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,22 @@ | 
				
			|||||
 | 
					%YAML 1.1 | 
				
			||||
 | 
					%TAG !u! tag:unity3d.com,2011: | 
				
			||||
 | 
					--- !u!1953259897 &8574412962073106934 | 
				
			||||
 | 
					TerrainLayer: | 
				
			||||
 | 
					  m_ObjectHideFlags: 0 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_Name: layer_(10.000,10.000)(-8.000,-8.000)(0.000,0.000,0.000),0.000,0.460 | 
				
			||||
 | 
					  m_DiffuseTexture: {fileID: 2800000, guid: b6a6551ec416c408e9353670dc7e6635, type: 3} | 
				
			||||
 | 
					  m_NormalMapTexture: {fileID: 0} | 
				
			||||
 | 
					  m_MaskMapTexture: {fileID: 0} | 
				
			||||
 | 
					  m_TileSize: {x: 10, y: 10} | 
				
			||||
 | 
					  m_TileOffset: {x: 0, y: 0} | 
				
			||||
 | 
					  m_Specular: {r: 0, g: 0, b: 0, a: 0} | 
				
			||||
 | 
					  m_Metallic: 0 | 
				
			||||
 | 
					  m_Smoothness: 0.46 | 
				
			||||
 | 
					  m_NormalScale: 1 | 
				
			||||
 | 
					  m_DiffuseRemapMin: {x: 0, y: 0, z: 0, w: 0} | 
				
			||||
 | 
					  m_DiffuseRemapMax: {x: 1, y: 1, z: 1, w: 1} | 
				
			||||
 | 
					  m_MaskMapRemapMin: {x: 0, y: 0, z: 0, w: 0} | 
				
			||||
 | 
					  m_MaskMapRemapMax: {x: 1, y: 1, z: 1, w: 1} | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 8656354215ef37f4e821bd52c6fad0e2 | 
				
			||||
 | 
					NativeFormatImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  mainObjectFileID: 8574412962073106934 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: d909489b885c4f54bb2356c8aea99dec | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: a919e5fd77e6ff14a802c5cf62d81a2a | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1 @@ | 
				
			|||||
 | 
					{"count":1,"self":18.401020799999998,"total":19.0026631,"children":{"InitializeActuators":{"count":1,"self":0.0009998,"total":0.0009998,"children":null},"InitializeSensors":{"count":1,"self":0.0010048,"total":0.0010048,"children":null},"AgentSendState":{"count":1117,"self":0.0080398999999999991,"total":0.1468565,"children":{"CollectObservations":{"count":559,"self":0.1277893,"total":0.1277893,"children":null},"WriteActionMask":{"count":559,"self":0.0005045,"total":0.0005045,"children":null},"RequestDecision":{"count":559,"self":0.010522799999999999,"total":0.010522799999999999,"children":null}}},"DecideAction":{"count":1117,"self":0.28126829999999997,"total":0.28126829999999997,"children":null},"AgentAct":{"count":1117,"self":0.1705073,"total":0.1705073,"children":null}},"gauges":{"DReCon-v0.CumulativeReward":{"count":3,"max":197.241531,"min":70.88822,"runningAverage":143.552612,"value":197.241531,"weightedAverage":119.659027}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1711034456","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Upgrade Demo -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId 585fb154-c60e-4d06-858f-da51882ef412 -accessToken uYlRmxZm8yQI0ljQ6TREamLSDSVcPFPnk5wEHmLEyOE005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1711034475"}} | 
				
			||||
@ -0,0 +1,7 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: a310a0758fd311245aad0375def7bcc8 | 
				
			||||
 | 
					TextScriptImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1 @@ | 
				
			|||||
 | 
					{"count":1,"self":43.5624288,"total":45.140246,"children":{"InitializeActuators":{"count":1,"self":0.0009999,"total":0.0009999,"children":null},"InitializeSensors":{"count":1,"self":0.0009996,"total":0.0009996,"children":null},"AgentSendState":{"count":3201,"self":0.018505999999999998,"total":0.42292569999999996,"children":{"CollectObservations":{"count":1601,"self":0.3853658,"total":0.3853658,"children":null},"WriteActionMask":{"count":1601,"self":0.0055122999999999995,"total":0.0055122999999999995,"children":null},"RequestDecision":{"count":1601,"self":0.013541599999999999,"total":0.013541599999999999,"children":null}}},"DecideAction":{"count":3201,"self":0.6847188,"total":0.6847188,"children":null},"AgentAct":{"count":3201,"self":0.4681722,"total":0.4681722,"children":null}},"gauges":{"DReCon-v0.CumulativeReward":{"count":6,"max":1306.72473,"min":13.3789816,"runningAverage":295.601318,"value":141.747467,"weightedAverage":200.906891}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1711034109","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Upgrade Demo -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId 585fb154-c60e-4d06-858f-da51882ef412 -accessToken gjBs-QzUiOMTdyqRQ553oxjojRRpG4-lOs_aadZonB8005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"SampleScene","end_time_seconds":"1711034154"}} | 
				
			||||
@ -0,0 +1,7 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: b494e22e3b9efd1439eeb04b86d290ff | 
				
			||||
 | 
					TextScriptImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: ea29cd7abf68e734e9e547f2161e5ed7 | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 6f468a3c0191e6747a78245c2f63de0e | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,53 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using UnityEditor; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					[CustomEditor(typeof(Muscles))] | 
				
			||||
 | 
					public class MusclesEditor : Editor | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    SerializedProperty Muscles; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void OnEnable() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Muscles = serializedObject.FindProperty("Muscles"); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public override void OnInspectorGUI() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        serializedObject.Update(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        GUILayout.Label(""); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        base.OnInspectorGUI(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        /* | 
				
			||||
 | 
					        if (GUILayout.Button("Recalculate Center of Masses")) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Muscles t = target as Muscles; | 
				
			||||
 | 
					            t.CenterABMasses(); | 
				
			||||
 | 
					        }*/ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        serializedObject.ApplyModifiedProperties(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 8f8a6234c58fa4a4abe62d80512988dd | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,145 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using UnityEditor; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					//This script assumes information was stored as SwingTwist
 | 
				
			||||
 | 
					//This means the script goes together with ROMparserSwingTwist
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					//we assume the articulationBodies have a name structure of hte form ANYNAME:something-in-the-targeted-joint
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					[CustomEditor(typeof(ROMparserSwingTwist))] | 
				
			||||
 | 
					public class ROMparserSwingTwistEditor : Editor | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    SerializedProperty ROMparserSwingTwist; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //NOT USED ANYMORE
 | 
				
			||||
 | 
					    //[SerializeField]
 | 
				
			||||
 | 
					    //string keyword4prefabs = "Constrained-procedurally";
 | 
				
			||||
 | 
					    //[SerializeField]
 | 
				
			||||
 | 
					    //RangeOfMotion004 theRagdollPrefab;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void OnEnable() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        ROMparserSwingTwist = serializedObject.FindProperty("ROMparserSwingTwist"); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public override void OnInspectorGUI() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        serializedObject.Update(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        GUILayout.Label(""); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        base.OnInspectorGUI(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        /* | 
				
			||||
 | 
					        if (GUILayout.Button("0.Debug: Set Joints To Max ROM")) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            ROMparserSwingTwist t = target as ROMparserSwingTwist; | 
				
			||||
 | 
					            t.SetJointsToMaxROM(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (GUILayout.Button("1.Store ROM info ")) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            ROMparserSwingTwist t = target as ROMparserSwingTwist; | 
				
			||||
 | 
					            EditorUtility.SetDirty(t.info2store); | 
				
			||||
 | 
					            AssetDatabase.SaveAssets(); | 
				
			||||
 | 
					            AssetDatabase.Refresh(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        GUILayout.Label("Prefab Ragdoll:"); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        GUILayout.Label("How to use:"); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        GUILayout.TextArea( | 
				
			||||
 | 
					            "Step 1: execute in play mode until the values in the Range Of Motion Preview  do not change any more" + | 
				
			||||
 | 
					            // " \n Step 2: click on button 1 to apply the constraints to check if the ragdoll looks reasonable" +
 | 
				
			||||
 | 
					            // " \n Step 3: in edit mode, click on button 1, and then on button 2, to generate a new constrained ragdoll. If a template for a SpawnableEnv is provided, also a new environment for training");
 | 
				
			||||
 | 
					            " \n Step 2: open the Ragdoll on which you want to apply the range of motion, and use the script ApplyRangeOfMotion004"); | 
				
			||||
 | 
					        */ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        serializedObject.ApplyModifiedProperties(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void storeNewPrefabWithROM(ProcRagdollAgent rda, ManyWorlds.SpawnableEnv envPrefab = null) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        ROMparserSwingTwist t = target as ROMparserSwingTwist; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //ROMinfoCollector infoStored = t.info2store;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Transform targetRoot = t.targetRagdollRoot.transform; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //string add2prefabs = keyword4prefabs;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Set the path,
 | 
				
			||||
 | 
					        // and name it as the GameObject's name with the .Prefab format
 | 
				
			||||
 | 
					        string localPath = "Assets/MarathonEnvs/Agents/Characters/MarathonMan004/" + targetRoot.name + ".prefab"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Make sure the file name is unique, in case an existing Prefab has the same name.
 | 
				
			||||
 | 
					        string uniqueLocalPath = AssetDatabase.GenerateUniqueAssetPath(localPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (PrefabUtility.IsAnyPrefabInstanceRoot(targetRoot.gameObject)) | 
				
			||||
 | 
					            //We want to store it independently from the current prefab. Therefore:
 | 
				
			||||
 | 
					            PrefabUtility.UnpackPrefabInstance(targetRoot.gameObject, PrefabUnpackMode.Completely, InteractionMode.AutomatedAction); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Create the new Prefab.
 | 
				
			||||
 | 
					        PrefabUtility.SaveAsPrefabAsset(targetRoot.gameObject, uniqueLocalPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Debug.Log("Saved new CharacterPrefab at: " + uniqueLocalPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (envPrefab != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Transform targetEnv = envPrefab.transform; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            targetEnv.name = "ControllerMarathonManEnv"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            string localEnvPath = "Assets/MarathonController/Environments/" + targetEnv.name + ".prefab"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // Make sure the file name is unique, in case an existing Prefab has the same name.
 | 
				
			||||
 | 
					            string uniqueLocalEnvPath = AssetDatabase.GenerateUniqueAssetPath(localEnvPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (PrefabUtility.IsAnyPrefabInstanceRoot(targetEnv.gameObject)) | 
				
			||||
 | 
					                //We want to store it independently from the current prefab. Therefore:
 | 
				
			||||
 | 
					                PrefabUtility.UnpackPrefabInstance(targetEnv.gameObject, PrefabUnpackMode.Completely, InteractionMode.AutomatedAction); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // Create the new Prefab.
 | 
				
			||||
 | 
					            PrefabUtility.SaveAsPrefabAsset(targetEnv.gameObject, uniqueLocalEnvPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Debug.Log("Saved new Environment Prefab at: " + uniqueLocalEnvPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: c871e0208cc70214e856b80d03e2025c | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,109 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using UnityEditor; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					[CustomEditor(typeof(TrainingEnvironmentGenerator))] | 
				
			||||
 | 
					public class TrainingEnvironmentGeneratorEditor : Editor | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public override void OnInspectorGUI() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        serializedObject.Update(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					         | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (GUILayout.Button("1.Generate training environment ")) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            TrainingEnvironmentGenerator t = target as TrainingEnvironmentGenerator; | 
				
			||||
 | 
					            t.GenerateTrainingEnv(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (GUILayout.Button("2 (optional) Generate ROM values")) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            TrainingEnvironmentGenerator t = target as TrainingEnvironmentGenerator; | 
				
			||||
 | 
					            t.GenerateRangeOfMotionParser(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            t.Prepare4RangeOfMotionParsing(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        GUILayout.Label("If (2), press play until the values in the ROM file do not change. Then press stop."); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (GUILayout.Button("3.Configure and Store")) { | 
				
			||||
 | 
					            TrainingEnvironmentGenerator t = target as TrainingEnvironmentGenerator; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //"3.We Configure Ragdoll and learning agent"
 | 
				
			||||
 | 
					            t.Prepare4EnvironmentStorage(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            t.ApplyROMasConstraintsAndConfigure(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //instructions below stores them, it can only be done in an editor script
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            storeEnvAsPrefab(t.Outcome); | 
				
			||||
 | 
					            //once stored we can destroy them to keep the scene clean
 | 
				
			||||
 | 
					            //DestroyImmediate(t.Outcome.gameObject);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            EditorUtility.SetDirty(t.info2store); | 
				
			||||
 | 
					            AssetDatabase.SaveAssets(); | 
				
			||||
 | 
					            AssetDatabase.Refresh(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        //GUILayout.Label("After (3), activate the Ragdoll game object within the hierarchy of the training environment generated.");
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        GUILayout.Label(""); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        base.OnInspectorGUI(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        serializedObject.ApplyModifiedProperties(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void storeEnvAsPrefab(ManyWorlds.SpawnableEnv env) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Set the path,
 | 
				
			||||
 | 
					        // and name it as the GameObject's name with the .Prefab format
 | 
				
			||||
 | 
					        string localPath = "Assets/MarathonController/GeneratedEnvironments/" + env.name + ".prefab"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Make sure the file name is unique, in case an existing Prefab has the same name.
 | 
				
			||||
 | 
					        string uniqueLocalPath = AssetDatabase.GenerateUniqueAssetPath(localPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (PrefabUtility.IsAnyPrefabInstanceRoot(env.gameObject)) | 
				
			||||
 | 
					            //We want to store it independently from the current prefab. Therefore:
 | 
				
			||||
 | 
					            PrefabUtility.UnpackPrefabInstance(env.gameObject, PrefabUnpackMode.Completely, InteractionMode.AutomatedAction); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Create the new Prefab.
 | 
				
			||||
 | 
					        PrefabUtility.SaveAsPrefabAsset(env.gameObject, uniqueLocalPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Debug.Log("Saved new Training Environment at: " + uniqueLocalPath); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 7f334119640072547b9ed56881d813da | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: b14787b743d2b0144ae2b3106595f5ac | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,357 @@ | 
				
			|||||
 | 
					
 | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class AnimationController : MonoBehaviour, IAnimationController | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    public float MaxForwardVelocity = 1f;        // Max run speed.
 | 
				
			||||
 | 
					    public float MinTurnVelocity = 400f;         // Turn velocity when moving at maximum speed.
 | 
				
			||||
 | 
					    public float MaxTurnVelocity = 1400f;        // Turn velocity when stationary.
 | 
				
			||||
 | 
					    public float JumpSpeed = 5f;                // 
 | 
				
			||||
 | 
					    public bool debugForceJump; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Animator _anim; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    CharacterController _characterController; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    InputController _inputController; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    bool _isGrounded; | 
				
			||||
 | 
					    bool _previouslyGrounded; | 
				
			||||
 | 
					    const float kAirborneTurnSpeedProportion = 5.4f; | 
				
			||||
 | 
					    const float kGroundTurnSpeedProportion = 200f / 2; | 
				
			||||
 | 
					    const float kGroundedRayDistance = 1f; | 
				
			||||
 | 
					    const float kJumpAbortSpeed = 10f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    const float kInverseOneEighty = 1f / 180f; | 
				
			||||
 | 
					    const float kStickingGravityProportion = 0.3f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    float _forwardVelocity; | 
				
			||||
 | 
					    Vector3 _lastGroundForwardVelocity; | 
				
			||||
 | 
					    float _desiredForwardSpeed; | 
				
			||||
 | 
					    float _verticalVelocity = -1f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    Quaternion _targetDirection;    // direction we want to move towards
 | 
				
			||||
 | 
					    float _angleDiff;               // delta between targetRotation and current roataion
 | 
				
			||||
 | 
					    Quaternion _targetRotation; | 
				
			||||
 | 
					    bool _readyToJump; | 
				
			||||
 | 
					    bool _inCombo; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Material materialUnderFoot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public LayerMask IgnoreLayers; | 
				
			||||
 | 
					     | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("for debugging, we disable this when setTpose in MarathonTestBedController is on")] | 
				
			||||
 | 
					    public bool doFixedUpdate = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    protected bool IsMoveInput | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        get { return !Mathf.Approximately(_inputController.MovementVector.sqrMagnitude, 0f); } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnEnable() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        OnAgentInitialize(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //TODO: this is also called from RagdollAgent004. Dependency should be removed, somehow.
 | 
				
			||||
 | 
					    public void OnAgentInitialize() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (!_anim) | 
				
			||||
 | 
					            _anim = GetComponent<Animator>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!_characterController) | 
				
			||||
 | 
					            _characterController = GetComponent<CharacterController>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!_inputController) //if it is used without a ragdoll agent (for example, for ROM extraction), we still need to initialize it
 | 
				
			||||
 | 
					            _inputController = GetComponent<InputController>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _targetDirection = Quaternion.Euler(0, 90, 0); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //Moved to Training Environment Generator
 | 
				
			||||
 | 
					        /* | 
				
			||||
 | 
					        var ragDoll = _spawnableEnv.GetComponentInChildren<RagDollAgent>( true);//we include inactive childs
 | 
				
			||||
 | 
					        if (ragDoll)//in the ROM extraction case we do not have any ragdoll agent
 | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _layerMask = 1 << ragDoll.gameObject.layer; | 
				
			||||
 | 
					            _layerMask |= 1 << this.gameObject.layer; | 
				
			||||
 | 
					            _layerMask = ~(_layerMask); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        */ | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public Vector3 GetDesiredVelocity() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Vector3 desiredVelocity = new Vector3( | 
				
			||||
 | 
					            _inputController.DesiredHorizontalVelocity.x, | 
				
			||||
 | 
					            0f, | 
				
			||||
 | 
					            _inputController.DesiredHorizontalVelocity.y); | 
				
			||||
 | 
					        return desiredVelocity; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void FixedUpdate() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        OnFixedUpdate(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void OnFixedUpdate() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // RotateTarget(Time.fixedDeltaTime);
 | 
				
			||||
 | 
					        SetTargetFromMoveInput(); | 
				
			||||
 | 
					        CalculateForwardMovement(Time.fixedDeltaTime); | 
				
			||||
 | 
					        CalculateVerticalMovement(Time.fixedDeltaTime); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (this.IsMoveInput) | 
				
			||||
 | 
					            SetTargetRotation(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        UpdateOrientation(Time.fixedDeltaTime); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // PlayAudio();
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // TimeoutToIdle();
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _previouslyGrounded = _isGrounded; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void OldOnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        _isGrounded = true; | 
				
			||||
 | 
					        _previouslyGrounded = true; | 
				
			||||
 | 
					        _inCombo = false; | 
				
			||||
 | 
					        _readyToJump = false; | 
				
			||||
 | 
					        _forwardVelocity = 0f; | 
				
			||||
 | 
					        _lastGroundForwardVelocity = Vector3.zero; | 
				
			||||
 | 
					        _desiredForwardSpeed = 0f; | 
				
			||||
 | 
					        _verticalVelocity = 0f; | 
				
			||||
 | 
					        _angleDiff = 0f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!doFixedUpdate) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _anim.SetBool("onGround", _isGrounded); | 
				
			||||
 | 
					        // _anim.SetFloat("verticalVelocity", _verticalVelocity);
 | 
				
			||||
 | 
					        _anim.SetFloat("angleDeltaRad", _angleDiff * Mathf.Deg2Rad); | 
				
			||||
 | 
					        _anim.SetFloat("forwardVelocity", _forwardVelocity); | 
				
			||||
 | 
					        _anim.SetBool("backflip", false); | 
				
			||||
 | 
					        _anim.Rebind(); | 
				
			||||
 | 
					        _anim.SetBool("onGround", _isGrounded); | 
				
			||||
 | 
					        // _anim.SetFloat("verticalVelocity", _verticalVelocity);
 | 
				
			||||
 | 
					        _anim.SetFloat("angleDeltaRad", _angleDiff * Mathf.Deg2Rad); | 
				
			||||
 | 
					        _anim.SetFloat("forwardVelocity", _forwardVelocity); | 
				
			||||
 | 
					        _anim.SetBool("backflip", false); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        OnFixedUpdate(); | 
				
			||||
 | 
					        _anim.Update(0f); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Called each physics step (so long as the Animator component is set to Animate Physics) after FixedUpdate to override root motion.
 | 
				
			||||
 | 
					    void OnAnimatorMove() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (_anim == null) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        Vector3 movement; | 
				
			||||
 | 
					        float verticalVelocity = _verticalVelocity; | 
				
			||||
 | 
					        if (_isGrounded) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // find ground
 | 
				
			||||
 | 
					            RaycastHit hit; | 
				
			||||
 | 
					            var rayStart = transform.position + ((Vector3.up * kGroundedRayDistance) * 0.5f); | 
				
			||||
 | 
					            Ray ray = new Ray(rayStart, -Vector3.up); | 
				
			||||
 | 
					            if (Physics.Raycast(ray, out hit, kGroundedRayDistance, ~IgnoreLayers, QueryTriggerInteraction.Ignore)) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                // project velocity on plane
 | 
				
			||||
 | 
					                movement = _anim.deltaPosition; | 
				
			||||
 | 
					                movement.y = 0f; | 
				
			||||
 | 
					                movement = Vector3.ProjectOnPlane(_anim.deltaPosition, hit.normal); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                // store material under foot
 | 
				
			||||
 | 
					                Renderer groundRenderer = hit.collider.GetComponentInChildren<Renderer>(); | 
				
			||||
 | 
					                materialUnderFoot = groundRenderer ? groundRenderer.sharedMaterial : null; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                // fail safe incase ray does not collide
 | 
				
			||||
 | 
					                movement = _anim.deltaPosition; | 
				
			||||
 | 
					                materialUnderFoot = null; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            _lastGroundForwardVelocity = movement / Time.fixedDeltaTime; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            movement = _lastGroundForwardVelocity * Time.fixedDeltaTime; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        // Rotate the transform of the character controller by the animation's root rotation.
 | 
				
			||||
 | 
					        _characterController.transform.rotation *= _anim.deltaRotation; | 
				
			||||
 | 
					        // print ($"delta:{_anim.deltaPosition.magnitude} movement:{movement.magnitude} delta:{_anim.deltaPosition} movement:{movement}");
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Add to the movement with the calculated vertical speed.
 | 
				
			||||
 | 
					        movement += verticalVelocity * Vector3.up * Time.fixedDeltaTime; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Move the character controller.
 | 
				
			||||
 | 
					        _characterController.Move(movement); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // After the movement store whether or not the character controller is grounded.
 | 
				
			||||
 | 
					        _isGrounded = _characterController.isGrounded; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // If Ellen is not on the ground then send the vertical speed to the animator.
 | 
				
			||||
 | 
					        // This is so the vertical speed is kept when landing so the correct landing animation is played.
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!_isGrounded) | 
				
			||||
 | 
					            _anim.SetFloat("verticalVelocity", verticalVelocity); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Send whether or not Ellen is on the ground to the animator.
 | 
				
			||||
 | 
					        _anim.SetBool("onGround", _isGrounded); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void RotateTarget(float deltaTime) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (!Mathf.Approximately(_inputController.CameraRotation.x * _inputController.CameraRotation.x, 0f)) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            float roation = _targetDirection.eulerAngles.y; | 
				
			||||
 | 
					            float delta = _inputController.CameraRotation.x * kGroundTurnSpeedProportion * deltaTime; | 
				
			||||
 | 
					            roation += delta; | 
				
			||||
 | 
					            // print($"{_targetDirection.eulerAngles.y} delta:{delta}, {roation}");
 | 
				
			||||
 | 
					            _targetDirection = Quaternion.Euler(0f, roation, 0f); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void SetTargetFromMoveInput() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (!_inputController) //if it is used without a ragdoll agent (for example, for ROM extraction), we still need to initialize it
 | 
				
			||||
 | 
					            OnAgentInitialize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector2 moveInput = _inputController.MovementVector; | 
				
			||||
 | 
					        Vector3 localMovementDirection = new Vector3(moveInput.x, 0f, moveInput.y).normalized; | 
				
			||||
 | 
					        _targetDirection = Quaternion.Euler(localMovementDirection); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void SetTargetRotation() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // Create three variables, move input local to the player, flattened forward direction of the camera and a local target rotation.
 | 
				
			||||
 | 
					        Vector2 moveInput = _inputController.MovementVector; | 
				
			||||
 | 
					        Vector3 localMovementDirection = new Vector3(moveInput.x, 0f, moveInput.y).normalized; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 forward = _targetDirection * Vector3.forward; | 
				
			||||
 | 
					        forward.y = 0f; | 
				
			||||
 | 
					        forward.Normalize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Quaternion targetRotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // // If the local movement direction is the opposite of forward then the target rotation should be towards the camera.
 | 
				
			||||
 | 
					        // if (Mathf.Approximately(Vector3.Dot(localMovementDirection, Vector3.forward), -1.0f))
 | 
				
			||||
 | 
					        // {
 | 
				
			||||
 | 
					        //     targetRotation = Quaternion.LookRotation(-forward);
 | 
				
			||||
 | 
					        // }
 | 
				
			||||
 | 
					        // else
 | 
				
			||||
 | 
					        // {
 | 
				
			||||
 | 
					        //     // Otherwise the rotation should be the offset of the input from the camera's forward.
 | 
				
			||||
 | 
					        //     Quaternion cameraToInputOffset = Quaternion.FromToRotation(Vector3.forward, localMovementDirection);
 | 
				
			||||
 | 
					        //     targetRotation = Quaternion.LookRotation(cameraToInputOffset * forward);
 | 
				
			||||
 | 
					        // }
 | 
				
			||||
 | 
					        // targetRotation = Quaternion.LookRotation(-forward);
 | 
				
			||||
 | 
					        Quaternion cameraToInputOffset = Quaternion.FromToRotation(Vector3.forward, localMovementDirection); | 
				
			||||
 | 
					        targetRotation = Quaternion.LookRotation(cameraToInputOffset * forward); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // The desired forward direction.
 | 
				
			||||
 | 
					        Vector3 resultingForward = targetRotation * Vector3.forward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Find the difference between the current rotation of the player and the desired rotation of the player in radians.
 | 
				
			||||
 | 
					        float angleCurrent = Mathf.Atan2(transform.forward.x, transform.forward.z) * Mathf.Rad2Deg; | 
				
			||||
 | 
					        float targetAngle = Mathf.Atan2(resultingForward.x, resultingForward.z) * Mathf.Rad2Deg; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _angleDiff = Mathf.DeltaAngle(angleCurrent, targetAngle); | 
				
			||||
 | 
					        _targetRotation = targetRotation; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void UpdateOrientation(float deltaTime) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        _anim.SetFloat("angleDeltaRad", _angleDiff * Mathf.Deg2Rad); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 localInput = new Vector3(_inputController.MovementVector.x, 0f, _inputController.MovementVector.y); | 
				
			||||
 | 
					        float groundedTurnSpeed = Mathf.Lerp(MaxTurnVelocity, MinTurnVelocity, _forwardVelocity / _desiredForwardSpeed); | 
				
			||||
 | 
					        float actualTurnSpeed = _isGrounded ? groundedTurnSpeed : Vector3.Angle(transform.forward, localInput) * kInverseOneEighty * kAirborneTurnSpeedProportion * groundedTurnSpeed; | 
				
			||||
 | 
					        _targetRotation = Quaternion.RotateTowards(transform.rotation, _targetRotation, actualTurnSpeed * deltaTime); | 
				
			||||
 | 
					        bool hasNan = float.IsNaN(_targetRotation.x) || float.IsNaN(_targetRotation.y) || float.IsNaN(_targetRotation.z); | 
				
			||||
 | 
					        if (!hasNan) | 
				
			||||
 | 
					            transform.rotation = _targetRotation; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void CalculateForwardMovement(float deltaTime) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // Cache the move input and cap it's magnitude at 1.
 | 
				
			||||
 | 
					        Vector2 moveInput = _inputController.MovementVector; | 
				
			||||
 | 
					        if (moveInput.sqrMagnitude > 1f) | 
				
			||||
 | 
					            moveInput.Normalize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Calculate the speed intended by input.
 | 
				
			||||
 | 
					        _desiredForwardSpeed = moveInput.magnitude * MaxForwardVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Note: acceleration is handle in InputController
 | 
				
			||||
 | 
					        _forwardVelocity = _desiredForwardSpeed; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Set the animator parameter to control what animation is being played.
 | 
				
			||||
 | 
					        _anim.SetFloat("forwardVelocity", _forwardVelocity); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void CalculateVerticalMovement(float deltaTime) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // If jump is not currently held and is on the ground then ready to jump.
 | 
				
			||||
 | 
					        if (!_inputController.Jump && _isGrounded) | 
				
			||||
 | 
					            _readyToJump = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _anim.SetBool("backflip", _inputController.Backflip); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (_isGrounded) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // When grounded we apply a slight negative vertical speed to make Ellen "stick" to the ground.
 | 
				
			||||
 | 
					            _verticalVelocity = Physics.gravity.y * kStickingGravityProportion; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // If jump is held, Ellen is ready to jump and not currently in the middle of a melee combo...
 | 
				
			||||
 | 
					            if (_inputController.Jump && _readyToJump && !_inCombo) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                // ... then override the previously set vertical speed and make sure she cannot jump again.
 | 
				
			||||
 | 
					                _verticalVelocity = JumpSpeed; | 
				
			||||
 | 
					                _isGrounded = false; | 
				
			||||
 | 
					                _readyToJump = false; | 
				
			||||
 | 
					                _anim.SetBool("onGround", false); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // If Ellen is airborne, the jump button is not held and Ellen is currently moving upwards...
 | 
				
			||||
 | 
					            if (!_inputController.Jump && _verticalVelocity > 0.0f) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                // ... decrease Ellen's vertical speed.
 | 
				
			||||
 | 
					                // This is what causes holding jump to jump higher that tapping jump.
 | 
				
			||||
 | 
					                _verticalVelocity -= kJumpAbortSpeed * deltaTime; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // If a jump is approximately peaking, make it absolute.
 | 
				
			||||
 | 
					            if (Mathf.Approximately(_verticalVelocity, 0f)) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                _verticalVelocity = 0f; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // If Ellen is airborne, apply gravity.
 | 
				
			||||
 | 
					            _verticalVelocity += Physics.gravity.y * deltaTime; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 83f0f0517c63942fcb11f8a22d799597 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,50 @@ | 
				
			|||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class AnimationMocapController : MonoBehaviour, IAnimationController | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    Animator _anim; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    CharacterController _characterController; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    Quaternion _targetDirection;    // direction we want to move towards
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public Vector3 MovementVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnEnable() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        OnAgentInitialize(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnAgentInitialize() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (!_anim) | 
				
			||||
 | 
					            _anim = GetComponent<Animator>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!_characterController) | 
				
			||||
 | 
					            _characterController = GetComponent<CharacterController>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _targetDirection = Quaternion.Euler(0, 90, 0); | 
				
			||||
 | 
					        MovementVelocity = Vector3.zero; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void OnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        _targetDirection = Quaternion.Euler(0, 90, 0); | 
				
			||||
 | 
					        // MovementVelocity = Vector3.zero;
 | 
				
			||||
 | 
					        // _anim.Rebind();
 | 
				
			||||
 | 
					        // _anim.Update(0f);
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void OnAnimatorMove() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (_anim == null) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        var movement = _anim.deltaPosition; | 
				
			||||
 | 
					        movement.y = 0f; | 
				
			||||
 | 
					        MovementVelocity = movement / Time.deltaTime; | 
				
			||||
 | 
					        this.transform.position += movement; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public Vector3 GetDesiredVelocity() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        return MovementVelocity; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: fda6ef4d268493b4db068ca6e63c3b45 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,88 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class DebugArticulationBody : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    public Vector3 jointAcceleration; | 
				
			||||
 | 
					    public Vector3 jointForce; | 
				
			||||
 | 
					    public Vector3 jointPosition; | 
				
			||||
 | 
					    public Vector3 jointVelocity; | 
				
			||||
 | 
					    public ArticulationJacobian jacobian; | 
				
			||||
 | 
						public List<int> dofStartIndices; | 
				
			||||
 | 
						public List<float> driveTargets; | 
				
			||||
 | 
						public List<float> driveTargetVelocities; | 
				
			||||
 | 
						public List<float> jointAccelerations; | 
				
			||||
 | 
						public List<float> jointForces; | 
				
			||||
 | 
						public List<float> jointPositions; | 
				
			||||
 | 
						public List<float> jointVelocities; | 
				
			||||
 | 
					    ArticulationBody _articulationBody; | 
				
			||||
 | 
					    // Start is called before the first frame update
 | 
				
			||||
 | 
					    void Start() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        _articulationBody = GetComponent<ArticulationBody>(); | 
				
			||||
 | 
					        foreach (var ab in this.GetComponentsInChildren<ArticulationBody>()) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (ab.GetComponent<DebugArticulationBody>() == null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                ab.gameObject.AddComponent<DebugArticulationBody>(); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Update is called once per frame
 | 
				
			||||
 | 
					    void Update() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (_articulationBody == null) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        if (_articulationBody.isRoot) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (dofStartIndices == null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                dofStartIndices = Enumerable.Range(0,_articulationBody.dofCount).ToList(); | 
				
			||||
 | 
					                driveTargets = Enumerable.Range(0,_articulationBody.dofCount) | 
				
			||||
 | 
					                    .Select(x=>0f).ToList(); | 
				
			||||
 | 
					                driveTargetVelocities = Enumerable.Range(0,_articulationBody.dofCount) | 
				
			||||
 | 
					                    .Select(x=>0f).ToList(); | 
				
			||||
 | 
					                jointAccelerations = Enumerable.Range(0,_articulationBody.dofCount) | 
				
			||||
 | 
					                    .Select(x=>0f).ToList(); | 
				
			||||
 | 
					                jointForces = Enumerable.Range(0,_articulationBody.dofCount) | 
				
			||||
 | 
					                    .Select(x=>0f).ToList(); | 
				
			||||
 | 
					                jointPositions = Enumerable.Range(0,_articulationBody.dofCount) | 
				
			||||
 | 
					                    .Select(x=>0f).ToList(); | 
				
			||||
 | 
					                jointVelocities = Enumerable.Range(0,_articulationBody.dofCount) | 
				
			||||
 | 
					                    .Select(x=>0f).ToList(); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            // _articulationBody.GetDenseJacobian(ref jacobian);
 | 
				
			||||
 | 
					            _articulationBody.GetDofStartIndices(dofStartIndices); | 
				
			||||
 | 
					            _articulationBody.GetDriveTargets(driveTargets); | 
				
			||||
 | 
					            _articulationBody.GetDriveTargetVelocities(driveTargetVelocities); | 
				
			||||
 | 
					            _articulationBody.GetJointAccelerations(jointAccelerations); | 
				
			||||
 | 
					            _articulationBody.GetJointForces(jointForces); | 
				
			||||
 | 
					            _articulationBody.GetJointPositions(jointPositions); | 
				
			||||
 | 
					            _articulationBody.GetJointVelocities(jointVelocities); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        if (_articulationBody.dofCount > 0) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            jointAcceleration.x = _articulationBody.jointAcceleration[0];  | 
				
			||||
 | 
					            jointForce.x = _articulationBody.jointForce[0];  | 
				
			||||
 | 
					            jointPosition.x = _articulationBody.jointPosition[0];  | 
				
			||||
 | 
					            jointVelocity.x = _articulationBody.jointVelocity[0];  | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        if (_articulationBody.dofCount > 1) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            jointAcceleration.y = _articulationBody.jointAcceleration[1];  | 
				
			||||
 | 
					            jointForce.y = _articulationBody.jointForce[1];  | 
				
			||||
 | 
					            jointPosition.y = _articulationBody.jointPosition[1];  | 
				
			||||
 | 
					            jointVelocity.y = _articulationBody.jointVelocity[1];  | 
				
			||||
 | 
					        }         | 
				
			||||
 | 
					        if (_articulationBody.dofCount > 2) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            jointAcceleration.z = _articulationBody.jointAcceleration[2];  | 
				
			||||
 | 
					            jointForce.z = _articulationBody.jointForce[2];  | 
				
			||||
 | 
					            jointPosition.z = _articulationBody.jointPosition[2];  | 
				
			||||
 | 
					            jointVelocity.z = _articulationBody.jointVelocity[2];  | 
				
			||||
 | 
					        }         | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: c3ff624b5f0d04045a1c2fe7658c3fdf | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,60 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					//This is a very simple animation controller that does nothing.
 | 
				
			||||
 | 
					//We will use it when we generate a physics ragdoll from an animated character
 | 
				
			||||
 | 
					//that has no specific animationController (i.e., a component that implements the IAnimaitonController interface)
 | 
				
			||||
 | 
					public class DefaultAnimationController : MonoBehaviour, IAnimationController | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Animator _anim; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnEnable() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        OnAgentInitialize(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Start is called before the first frame update
 | 
				
			||||
 | 
					    void Start() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					         | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Update is called once per frame
 | 
				
			||||
 | 
					    void Update() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					         | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnAgentInitialize() { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!_anim) | 
				
			||||
 | 
					            _anim = GetComponent<Animator>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void OnReset() {  | 
				
			||||
 | 
					     | 
				
			||||
 | 
					     | 
				
			||||
 | 
					     | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public Vector3 GetDesiredVelocity() { | 
				
			||||
 | 
					        //TODO: check if this is really what we want, we may need the root velocity
 | 
				
			||||
 | 
					        return _anim.angularVelocity; | 
				
			||||
 | 
					     | 
				
			||||
 | 
					     | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 483dd03a765994d47aa7b4c23af4636e | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,9 @@ | 
				
			|||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public interface IAnimationController | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    void OnAgentInitialize(); | 
				
			||||
 | 
					    void OnReset(); | 
				
			||||
 | 
					    Vector3 GetDesiredVelocity(); | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: a031743a3ca1c084da6715804ea7f77d | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,14 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class IgnoreColliderForObservation : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    // Start is called before the first frame update
 | 
				
			||||
 | 
					    void Start() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					         | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: eebc76d5f8d6545e2a99489d15e426be | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class IgnoreColliderForReward : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 28433c7e35a934e9993f0337e2aacd4e | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,594 @@ | 
				
			|||||
 | 
					using System; | 
				
			||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using Unity.MLAgents; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using UnityEngine.Assertions; | 
				
			||||
 | 
					using UnityEngine.AI; | 
				
			||||
 | 
					using System.Linq.Expressions; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class MapAnim2Ragdoll : MonoBehaviour, IOnSensorCollision  | 
				
			||||
 | 
					{//previously Mocap Controller Artanim
 | 
				
			||||
 | 
						public List<float> SensorIsInTouch; | 
				
			||||
 | 
						List<GameObject> _sensors; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						internal Animator anim; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						[Range(0f,1f)] | 
				
			||||
 | 
						public float NormalizedTime;     | 
				
			||||
 | 
						public float Lenght; | 
				
			||||
 | 
						public bool IsLoopingAnimation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						[SerializeField] | 
				
			||||
 | 
						Rigidbody _rigidbodyRoot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						List<Transform> _animTransforms; | 
				
			||||
 | 
						 | 
				
			||||
 | 
						public List<Transform> _ragdollTransforms; | 
				
			||||
 | 
						List<Rigidbody> _ragDollRigidbody; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						// private List<Rigidbody> _rigidbodies;
 | 
				
			||||
 | 
						// private List<Transform> _transforms;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						public bool RequestCamera; | 
				
			||||
 | 
						public bool CameraFollowMe; | 
				
			||||
 | 
						public Transform CameraTarget; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						Vector3 _resetPosition; | 
				
			||||
 | 
						Quaternion _resetRotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						[Space(20)] | 
				
			||||
 | 
						[Header("Stats")] | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocity; | 
				
			||||
 | 
					    public float CenterOfMassVelocityMagnitude; | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocityInRootSpace; | 
				
			||||
 | 
					    public float CenterOfMassVelocityMagnitudeInRootSpace; | 
				
			||||
 | 
					    public Vector3 LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					    public Vector3 LastRootPositionInWorldSpace; | 
				
			||||
 | 
					    public Vector3 LastHeadPositionInWorldSpace; | 
				
			||||
 | 
						public Vector3 HorizontalDirection; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						public List<Vector3> LastPosition; | 
				
			||||
 | 
						public List<Quaternion> LastRotation; | 
				
			||||
 | 
						public List<Vector3> Velocities; | 
				
			||||
 | 
						public List<Vector3> AngularVelocities; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						//TODO: find a way to remove this dependency (otherwise, not fully procedural)
 | 
				
			||||
 | 
						private bool _usingMocapAnimatorController = false; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						IAnimationController _mocapAnimController; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						// [SerializeField]
 | 
				
			||||
 | 
						// float _debugDistance = 0.0f;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						private List<MappingOffset> _offsetsSource2RB = null; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //for debugging, we disable this when setTpose in MarathonTestBedController is on
 | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    public bool doFixedUpdate = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						bool _hasLazyInitialized; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						bool _hackyNavAgentMode; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						Collider _root; | 
				
			||||
 | 
						Collider _head; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						public void OnAgentInitialize() | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							LazyInitialize(); | 
				
			||||
 | 
						} | 
				
			||||
 | 
						void LazyInitialize() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
							if (_hasLazyInitialized) | 
				
			||||
 | 
								return; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							// check if we need to create our ragdoll
 | 
				
			||||
 | 
							var ragdoll4Mocap = GetComponentsInChildren<Transform>() | 
				
			||||
 | 
								.Where(x=>x.name == "RagdollForMocap") | 
				
			||||
 | 
								.FirstOrDefault(); | 
				
			||||
 | 
							if (ragdoll4Mocap == null) | 
				
			||||
 | 
								DynamicallyCreateRagdollForMocap(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							_mocapAnimController = GetComponent<IAnimationController>(); | 
				
			||||
 | 
							_usingMocapAnimatorController = _mocapAnimController != null; | 
				
			||||
 | 
							if (!_usingMocapAnimatorController) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								Debug.LogWarning("Mocap Controller is working WITHOUT AnimationController"); | 
				
			||||
 | 
							} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							var ragdollTransforms =  | 
				
			||||
 | 
								GetComponentsInChildren<Transform>() | 
				
			||||
 | 
								.Where(x=>x.name.StartsWith("articulation")) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							var ragdollNames = ragdollTransforms | 
				
			||||
 | 
								.Select(x=>x.name) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							var animNames = ragdollNames | 
				
			||||
 | 
								.Select(x=>x.Replace("articulation:","")) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							var animTransforms = animNames | 
				
			||||
 | 
								.Select(x=>GetComponentsInChildren<Transform>().FirstOrDefault(y=>y.name == x)) | 
				
			||||
 | 
								.Where(x=>x!=null) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							_animTransforms = new List<Transform>(); | 
				
			||||
 | 
							_ragdollTransforms = new List<Transform>(); | 
				
			||||
 | 
							// first time, copy position and rotation
 | 
				
			||||
 | 
							foreach (var animTransform in animTransforms) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								var ragdollTransform = ragdollTransforms | 
				
			||||
 | 
									.First(x=>x.name == $"articulation:{animTransform.name}"); | 
				
			||||
 | 
								ragdollTransform.position = animTransform.position; | 
				
			||||
 | 
								ragdollTransform.rotation = animTransform.rotation; | 
				
			||||
 | 
								_animTransforms.Add(animTransform); | 
				
			||||
 | 
								_ragdollTransforms.Add(ragdollTransform); | 
				
			||||
 | 
							} | 
				
			||||
 | 
							_ragDollRigidbody = _ragdollTransforms | 
				
			||||
 | 
								.Select(x=>x.GetComponent<Rigidbody>()) | 
				
			||||
 | 
								.Where(x=> x != null) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        SetupSensors(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							if (RequestCamera && CameraTarget != null) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								var instances = FindObjectsOfType<MapAnim2Ragdoll>().ToList(); | 
				
			||||
 | 
								if (instances.Count(x=>x.CameraFollowMe) < 1) | 
				
			||||
 | 
									CameraFollowMe = true; | 
				
			||||
 | 
							} | 
				
			||||
 | 
					        if (CameraFollowMe){ | 
				
			||||
 | 
					            var camera = FindObjectOfType<Camera>(); | 
				
			||||
 | 
					            var follow = camera.GetComponent<SmoothFollow>(); | 
				
			||||
 | 
					            follow.target = CameraTarget; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
							var navAgent = GetComponent<NavMeshAgent>(); | 
				
			||||
 | 
							if (navAgent) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								var radius = 16f; | 
				
			||||
 | 
					            Vector3 randomDirection = UnityEngine.Random.insideUnitSphere * radius; | 
				
			||||
 | 
					            NavMeshHit hit; | 
				
			||||
 | 
					            Vector3 finalPosition = Vector3.zero; | 
				
			||||
 | 
					            if (NavMesh.SamplePosition(randomDirection, out hit, radius, 1)) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                finalPosition = hit.position; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
								transform.position = finalPosition; | 
				
			||||
 | 
								_hackyNavAgentMode = true; | 
				
			||||
 | 
							} | 
				
			||||
 | 
							_resetPosition = transform.position; | 
				
			||||
 | 
							_resetRotation = transform.rotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							_hasLazyInitialized = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							// NOTE: do after setting _hasLazyInitialized as can trigger infinate loop
 | 
				
			||||
 | 
							anim = GetComponent<Animator>(); | 
				
			||||
 | 
							if (_usingMocapAnimatorController) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								anim.Update(0f); | 
				
			||||
 | 
							} | 
				
			||||
 | 
					        var colliders = GetComponentsInChildren<Collider>().ToList(); | 
				
			||||
 | 
							_root = colliders.FirstOrDefault(); | 
				
			||||
 | 
							_head = colliders.FirstOrDefault(x=>x.name.ToLower().Contains("head")); | 
				
			||||
 | 
							if (_head == null) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								Debug.LogWarning($"{nameof(MapAnim2Ragdoll)}.{nameof(LazyInitialize)}() can not find the head. "); | 
				
			||||
 | 
							} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						public void DynamicallyCreateRagdollForMocap() | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							// Find Ragdoll in parent
 | 
				
			||||
 | 
							Transform parent = this.transform.parent; | 
				
			||||
 | 
							ProcRagdollAgent[] ragdolls = parent.GetComponentsInChildren<ProcRagdollAgent>(true); | 
				
			||||
 | 
							Assert.AreEqual(ragdolls.Length, 1, "code only supports one RagDollAgent"); | 
				
			||||
 | 
							ProcRagdollAgent ragDoll = ragdolls[0]; | 
				
			||||
 | 
							var ragdollForMocap = new GameObject("RagdollForMocap"); | 
				
			||||
 | 
							ragdollForMocap.transform.SetParent(this.transform, false); | 
				
			||||
 | 
							Assert.AreEqual(ragDoll.transform.childCount, 1, "code only supports 1 child"); | 
				
			||||
 | 
							var ragdollRoot = ragDoll.transform.GetChild(0); | 
				
			||||
 | 
							// clone the ragdoll root
 | 
				
			||||
 | 
							var clone = Instantiate(ragdollRoot); | 
				
			||||
 | 
							// remove '(clone)' from names
 | 
				
			||||
 | 
							foreach (var t in clone.GetComponentsInChildren<Transform>()) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								t.name = t.name.Replace("(Clone)", ""); | 
				
			||||
 | 
							} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							// swap ArticulatedBody for RidgedBody
 | 
				
			||||
 | 
					        List<string> bodiesNamesToDelete = new List<string>(); | 
				
			||||
 | 
							foreach (var abody in clone.GetComponentsInChildren<ArticulationBody>()) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								var bodyGameobject = abody.gameObject; | 
				
			||||
 | 
								var rb = bodyGameobject.AddComponent<Rigidbody>(); | 
				
			||||
 | 
								rb.mass = abody.mass; | 
				
			||||
 | 
								rb.useGravity = abody.useGravity; | 
				
			||||
 | 
								// it makes no sense but if i do not set the layer here, then some objects dont have the correct layer
 | 
				
			||||
 | 
								rb.gameObject.layer  = this.gameObject.layer; | 
				
			||||
 | 
								bodiesNamesToDelete.Add(abody.name); | 
				
			||||
 | 
							} | 
				
			||||
 | 
							foreach (var name in bodiesNamesToDelete) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								var abody = clone | 
				
			||||
 | 
									.GetComponentsInChildren<ArticulationBody>() | 
				
			||||
 | 
									.First(x=>x.name == name); | 
				
			||||
 | 
								DestroyImmediate(abody); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							} | 
				
			||||
 | 
							// make Kinematic
 | 
				
			||||
 | 
							foreach (var rb in clone.GetComponentsInChildren<Rigidbody>()) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								rb.isKinematic = true; | 
				
			||||
 | 
							} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							//we do this after removing the ArticulationBody, since moving the root in the articulationBody creates TROUBLE
 | 
				
			||||
 | 
							clone.transform.SetParent(ragdollForMocap.transform, false); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							// setup HandleOverlap
 | 
				
			||||
 | 
							foreach (var rb in clone.GetComponentsInChildren<Rigidbody>()) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								// remove cloned HandledOverlap
 | 
				
			||||
 | 
								var oldHandleOverlap = rb.GetComponent<HandleOverlap>(); | 
				
			||||
 | 
								if (oldHandleOverlap != null) | 
				
			||||
 | 
								{ | 
				
			||||
 | 
									DestroyImmediate(oldHandleOverlap); | 
				
			||||
 | 
								} | 
				
			||||
 | 
								var handleOverlap = rb.gameObject.AddComponent<HandleOverlap>(); | 
				
			||||
 | 
								handleOverlap.Parent = clone.gameObject; | 
				
			||||
 | 
							} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							// set the root
 | 
				
			||||
 | 
							this._rigidbodyRoot = clone.GetComponent<Rigidbody>(); | 
				
			||||
 | 
							// set the layers
 | 
				
			||||
 | 
							ragdollForMocap.layer = this.gameObject.layer; | 
				
			||||
 | 
							foreach (Transform child in ragdollForMocap.GetComponentInChildren<Transform>()) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								child.gameObject.layer  = this.gameObject.layer; | 
				
			||||
 | 
							} | 
				
			||||
 | 
							var triggers = ragdollForMocap | 
				
			||||
 | 
								.GetComponentsInChildren<Collider>() | 
				
			||||
 | 
								.Where(x=>x.isTrigger); | 
				
			||||
 | 
							foreach (var trigger in triggers) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								trigger.gameObject.SetActive(false); | 
				
			||||
 | 
								trigger.gameObject.SetActive(true); | 
				
			||||
 | 
							} | 
				
			||||
 | 
						} | 
				
			||||
 | 
						void SetupSensors() | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							_sensors = GetComponentsInChildren<SensorBehavior>() | 
				
			||||
 | 
								.Select(x=>x.gameObject) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							SensorIsInTouch = Enumerable.Range(0,_sensors.Count).Select(x=>0f).ToList(); | 
				
			||||
 | 
						} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnStep(float timeDelta) { | 
				
			||||
 | 
							LazyInitialize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							if (_lastPositionTime == Time.time) | 
				
			||||
 | 
								return; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //if (!_usesMotionMatching)
 | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            AnimatorStateInfo stateInfo = anim.GetCurrentAnimatorStateInfo(0); | 
				
			||||
 | 
					            AnimatorClipInfo[] clipInfo = anim.GetCurrentAnimatorClipInfo(0); | 
				
			||||
 | 
					            Lenght = stateInfo.length; | 
				
			||||
 | 
					            NormalizedTime = stateInfo.normalizedTime; | 
				
			||||
 | 
					            IsLoopingAnimation = stateInfo.loop; | 
				
			||||
 | 
					            var timeStep = stateInfo.length * stateInfo.normalizedTime;     | 
				
			||||
 | 
					        } | 
				
			||||
 | 
							MimicAnimation(); | 
				
			||||
 | 
					        // get Center Of Mass velocity in f space
 | 
				
			||||
 | 
							var newCOM = GetCenterOfMass(); | 
				
			||||
 | 
							var lastCOM = LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
							LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
							var velocity = newCOM - lastCOM; | 
				
			||||
 | 
							velocity -= _snapOffset; | 
				
			||||
 | 
							velocity /= timeDelta; | 
				
			||||
 | 
							CenterOfMassVelocity = velocity; | 
				
			||||
 | 
							CenterOfMassVelocityMagnitude = CenterOfMassVelocity.magnitude; | 
				
			||||
 | 
							CenterOfMassVelocityInRootSpace = transform.InverseTransformVector(velocity); | 
				
			||||
 | 
							CenterOfMassVelocityMagnitudeInRootSpace = CenterOfMassVelocityInRootSpace.magnitude; | 
				
			||||
 | 
							HorizontalDirection = new Vector3(0f, transform.eulerAngles.y, 0f); | 
				
			||||
 | 
							LastRootPositionInWorldSpace = _root.transform.position; | 
				
			||||
 | 
							LastHeadPositionInWorldSpace = _head.transform.position; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							var newPosition = _ragDollRigidbody | 
				
			||||
 | 
								.Select(x=>x.position) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							var newRotation = _ragDollRigidbody | 
				
			||||
 | 
								.Select(x=>x.transform.localRotation) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							Velocities = LastPosition | 
				
			||||
 | 
								// .Zip(newPosition, (last, cur)=> (cur-last)/timeDelta)
 | 
				
			||||
 | 
								.Zip(newPosition, (last, cur)=> (cur-last-_snapOffset)/timeDelta) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							AngularVelocities = LastRotation | 
				
			||||
 | 
								.Zip(newRotation, (last, cur)=> Utils.GetAngularVelocity(cur, last, timeDelta)) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							LastPosition = newPosition; | 
				
			||||
 | 
							LastRotation = newRotation; | 
				
			||||
 | 
							_snapOffset = Vector3.zero; | 
				
			||||
 | 
							_lastPositionTime = Time.time;		 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						float _lastPositionTime = float.MinValue; | 
				
			||||
 | 
						Vector3 _snapOffset = Vector3.zero; | 
				
			||||
 | 
						void MimicAnimation() { | 
				
			||||
 | 
							if (!anim.enabled) | 
				
			||||
 | 
								return; | 
				
			||||
 | 
							// copy position for root (assume first target is root)
 | 
				
			||||
 | 
							_ragdollTransforms[0].position = _animTransforms[0].position; | 
				
			||||
 | 
							// copy rotation
 | 
				
			||||
 | 
							for (int i = 0; i < _animTransforms.Count; i++) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								_ragdollTransforms[i].rotation = _animTransforms[i].rotation; | 
				
			||||
 | 
							} | 
				
			||||
 | 
						} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						 | 
				
			||||
 | 
					    public Vector3 GetCenterOfMass() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var centerOfMass = Vector3.zero; | 
				
			||||
 | 
					        float totalMass = 0f; | 
				
			||||
 | 
					        foreach (Rigidbody ab in _ragDollRigidbody) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            centerOfMass += ab.worldCenterOfMass * ab.mass; | 
				
			||||
 | 
					            totalMass += ab.mass; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        centerOfMass /= totalMass; | 
				
			||||
 | 
					        // centerOfMass -= _spawnableEnv.transform.position;
 | 
				
			||||
 | 
					        return centerOfMass; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						public void OnReset(Quaternion resetRotation) | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							LazyInitialize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!doFixedUpdate) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							if (!_hackyNavAgentMode) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								transform.position = _resetPosition; | 
				
			||||
 | 
								// handle character controller skin width
 | 
				
			||||
 | 
								var characterController = GetComponent<CharacterController>(); | 
				
			||||
 | 
								if (characterController != null) | 
				
			||||
 | 
								{ | 
				
			||||
 | 
									var pos = transform.position; | 
				
			||||
 | 
									pos.y += characterController.skinWidth; | 
				
			||||
 | 
									transform.position = pos; | 
				
			||||
 | 
								} | 
				
			||||
 | 
								transform.rotation = resetRotation; | 
				
			||||
 | 
							} | 
				
			||||
 | 
							MimicAnimation(); | 
				
			||||
 | 
							_snapOffset = Vector3.zero; | 
				
			||||
 | 
							LastCenterOfMassInWorldSpace = GetCenterOfMass(); | 
				
			||||
 | 
							LastRootPositionInWorldSpace = _root.transform.position; | 
				
			||||
 | 
							LastHeadPositionInWorldSpace = _head.transform.position; | 
				
			||||
 | 
							LastPosition = _ragDollRigidbody | 
				
			||||
 | 
								.Select(x=>x.position) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
							LastRotation = _ragDollRigidbody | 
				
			||||
 | 
								.Select(x=>x.transform.localRotation) | 
				
			||||
 | 
								.ToList(); | 
				
			||||
 | 
						} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnSensorCollisionEnter(Collider sensorCollider, GameObject other) | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							LazyInitialize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							//if (string.Compare(other.name, "Terrain", true) !=0)
 | 
				
			||||
 | 
							if (other.layer != LayerMask.NameToLayer("Ground")) | 
				
			||||
 | 
									return; | 
				
			||||
 | 
							var sensor = _sensors | 
				
			||||
 | 
								.FirstOrDefault(x=>x == sensorCollider.gameObject); | 
				
			||||
 | 
							if (sensor != null) { | 
				
			||||
 | 
								var idx = _sensors.IndexOf(sensor); | 
				
			||||
 | 
								SensorIsInTouch[idx] = 1f; | 
				
			||||
 | 
							} | 
				
			||||
 | 
						} | 
				
			||||
 | 
						public void OnSensorCollisionExit(Collider sensorCollider, GameObject other) | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							LazyInitialize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							if (other.layer != LayerMask.NameToLayer("Ground")) | 
				
			||||
 | 
									return; | 
				
			||||
 | 
							var sensor = _sensors | 
				
			||||
 | 
								.FirstOrDefault(x=>x == sensorCollider.gameObject); | 
				
			||||
 | 
							if (sensor != null) { | 
				
			||||
 | 
								var idx = _sensors.IndexOf(sensor); | 
				
			||||
 | 
								SensorIsInTouch[idx] = 0f; | 
				
			||||
 | 
							} | 
				
			||||
 | 
						} | 
				
			||||
 | 
					    public void CopyStatesTo(GameObject target) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
							LazyInitialize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        var targets = target.GetComponentsInChildren<ArticulationBody>().ToList(); | 
				
			||||
 | 
							if (targets?.Count == 0) | 
				
			||||
 | 
								return; | 
				
			||||
 | 
					        var root = targets.First(x=>x.isRoot); | 
				
			||||
 | 
							// root.gameObject.SetActive(false);
 | 
				
			||||
 | 
							var rstat = _ragDollRigidbody.First(x=>x.name == root.name); | 
				
			||||
 | 
							root.TeleportRoot(rstat.position, rstat.rotation); | 
				
			||||
 | 
							root.transform.position = rstat.position; | 
				
			||||
 | 
							root.transform.rotation = rstat.rotation; | 
				
			||||
 | 
							// root.gameObject.SetActive(true);
 | 
				
			||||
 | 
							foreach (var targetRb in targets) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
								var stat = _ragDollRigidbody.First(x=>x.name == targetRb.name); | 
				
			||||
 | 
								if (targetRb.isRoot) | 
				
			||||
 | 
									continue; | 
				
			||||
 | 
								// bool shouldDebug = targetRb.name == "articulation:mixamorig:RightArm";
 | 
				
			||||
 | 
								// bool didDebug = false;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
								if (targetRb.jointType == ArticulationJointType.SphericalJoint) | 
				
			||||
 | 
								{ | 
				
			||||
 | 
									float stiffness = 0f; | 
				
			||||
 | 
									float damping = float.MaxValue; | 
				
			||||
 | 
									float forceLimit = 0f; | 
				
			||||
 | 
									// if (shouldDebug)
 | 
				
			||||
 | 
									// 	didDebug = true;
 | 
				
			||||
 | 
									Vector3 decomposedRotation = Utils.GetSwingTwist(stat.transform.localRotation); | 
				
			||||
 | 
									int j=0; | 
				
			||||
 | 
									List<float> thisJointPosition = Enumerable.Range(0,targetRb.dofCount).Select(x=>0f).ToList();  | 
				
			||||
 | 
									 | 
				
			||||
 | 
									if (targetRb.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
									{ | 
				
			||||
 | 
										var drive = targetRb.xDrive; | 
				
			||||
 | 
										var deg = decomposedRotation.x; | 
				
			||||
 | 
										thisJointPosition[j++] = deg * Mathf.Deg2Rad; | 
				
			||||
 | 
										drive.stiffness = stiffness; | 
				
			||||
 | 
										drive.damping = damping; | 
				
			||||
 | 
										drive.forceLimit = forceLimit; | 
				
			||||
 | 
										drive.target = deg; | 
				
			||||
 | 
										targetRb.xDrive = drive; | 
				
			||||
 | 
									} | 
				
			||||
 | 
									if (targetRb.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
									{ | 
				
			||||
 | 
										var drive = targetRb.yDrive; | 
				
			||||
 | 
										var deg = decomposedRotation.y; | 
				
			||||
 | 
										thisJointPosition[j++] = deg * Mathf.Deg2Rad; | 
				
			||||
 | 
										drive.stiffness = stiffness; | 
				
			||||
 | 
										drive.damping = damping; | 
				
			||||
 | 
										drive.forceLimit = forceLimit; | 
				
			||||
 | 
										drive.target = deg; | 
				
			||||
 | 
										targetRb.yDrive = drive; | 
				
			||||
 | 
									} | 
				
			||||
 | 
									if (targetRb.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
									{ | 
				
			||||
 | 
										var drive = targetRb.zDrive; | 
				
			||||
 | 
										var deg = decomposedRotation.z; | 
				
			||||
 | 
										thisJointPosition[j++] = deg * Mathf.Deg2Rad; | 
				
			||||
 | 
										drive.stiffness = stiffness; | 
				
			||||
 | 
										drive.damping = damping; | 
				
			||||
 | 
										drive.forceLimit = forceLimit; | 
				
			||||
 | 
										drive.target = deg; | 
				
			||||
 | 
										targetRb.zDrive = drive; | 
				
			||||
 | 
									} | 
				
			||||
 | 
									switch (targetRb.dofCount) | 
				
			||||
 | 
									{ | 
				
			||||
 | 
										case 1: | 
				
			||||
 | 
											targetRb.jointPosition = new ArticulationReducedSpace(thisJointPosition[0]); | 
				
			||||
 | 
											break; | 
				
			||||
 | 
										case 2: | 
				
			||||
 | 
											targetRb.jointPosition = new ArticulationReducedSpace( | 
				
			||||
 | 
												thisJointPosition[0], | 
				
			||||
 | 
												thisJointPosition[1]); | 
				
			||||
 | 
											break; | 
				
			||||
 | 
										case 3: | 
				
			||||
 | 
											targetRb.jointPosition = new ArticulationReducedSpace( | 
				
			||||
 | 
												thisJointPosition[0], | 
				
			||||
 | 
												thisJointPosition[1], | 
				
			||||
 | 
												thisJointPosition[2]); | 
				
			||||
 | 
											break; | 
				
			||||
 | 
										default: | 
				
			||||
 | 
											break; | 
				
			||||
 | 
									} | 
				
			||||
 | 
								} | 
				
			||||
 | 
					        } | 
				
			||||
 | 
							foreach (var childAb in root.GetComponentsInChildren<ArticulationBody>()) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								childAb.angularVelocity = Vector3.zero; | 
				
			||||
 | 
								childAb.velocity = Vector3.zero; | 
				
			||||
 | 
							} | 
				
			||||
 | 
					    } | 
				
			||||
 | 
						public void CopyVelocityTo(GameObject targetGameObject, Vector3 velocity) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
							LazyInitialize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        var targets = targetGameObject.GetComponentsInChildren<ArticulationBody>().ToList(); | 
				
			||||
 | 
							if (targets?.Count == 0) | 
				
			||||
 | 
								return; | 
				
			||||
 | 
					        var root = targets.First(x=>x.isRoot); | 
				
			||||
 | 
							 | 
				
			||||
 | 
							if (Velocities == null || Velocities.Count == 0) | 
				
			||||
 | 
								return; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
							Vector3 aveVelocity = Vector3.zero; | 
				
			||||
 | 
							Vector3 aveAngularVelocity = Vector3.zero; | 
				
			||||
 | 
							for (int i = 0; i < _ragDollRigidbody.Count; i++) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								var source = _ragDollRigidbody[i]; | 
				
			||||
 | 
								var target = targets.First(x=>x.name == source.name); | 
				
			||||
 | 
								var vel = Velocities[i]; | 
				
			||||
 | 
								var angVel = AngularVelocities[i]; | 
				
			||||
 | 
					            foreach (var childAb in target.GetComponentsInChildren<ArticulationBody>()) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                if (childAb == target) | 
				
			||||
 | 
					                    continue; | 
				
			||||
 | 
					                childAb.transform.localPosition = Vector3.zero; | 
				
			||||
 | 
					                childAb.transform.localEulerAngles = Vector3.zero; | 
				
			||||
 | 
					                childAb.angularVelocity = Vector3.zero; | 
				
			||||
 | 
					                childAb.velocity = Vector3.zero; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
								if (target.jointType == ArticulationJointType.SphericalJoint && !target.isRoot) | 
				
			||||
 | 
								{ | 
				
			||||
 | 
									int j=0; | 
				
			||||
 | 
									List<float> thisJointVelocity = Enumerable.Range(0, target.dofCount).Select(x=>0f).ToList();  | 
				
			||||
 | 
									 | 
				
			||||
 | 
									if (target.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
									{ | 
				
			||||
 | 
										thisJointVelocity[j++] = angVel.x; | 
				
			||||
 | 
									} | 
				
			||||
 | 
									if (target.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
									{ | 
				
			||||
 | 
										thisJointVelocity[j++] = angVel.y; | 
				
			||||
 | 
									} | 
				
			||||
 | 
									if (target.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
									{ | 
				
			||||
 | 
										thisJointVelocity[j++] = angVel.z; | 
				
			||||
 | 
									} | 
				
			||||
 | 
									switch (target.dofCount) | 
				
			||||
 | 
									{ | 
				
			||||
 | 
										case 1: | 
				
			||||
 | 
											target.jointVelocity = new ArticulationReducedSpace(thisJointVelocity[0]); | 
				
			||||
 | 
											break; | 
				
			||||
 | 
										case 2: | 
				
			||||
 | 
											target.jointVelocity = new ArticulationReducedSpace( | 
				
			||||
 | 
												thisJointVelocity[0], | 
				
			||||
 | 
												thisJointVelocity[1]); | 
				
			||||
 | 
											break; | 
				
			||||
 | 
										case 3: | 
				
			||||
 | 
											target.jointVelocity = new ArticulationReducedSpace( | 
				
			||||
 | 
												thisJointVelocity[0], | 
				
			||||
 | 
												thisJointVelocity[1], | 
				
			||||
 | 
												thisJointVelocity[2]); | 
				
			||||
 | 
											break; | 
				
			||||
 | 
										default: | 
				
			||||
 | 
											break; | 
				
			||||
 | 
									} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
								} | 
				
			||||
 | 
					            target.velocity = vel; | 
				
			||||
 | 
								aveVelocity += Velocities[i]; | 
				
			||||
 | 
								aveAngularVelocity += AngularVelocities[i]; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
							var c = (float)_ragDollRigidbody.Count; | 
				
			||||
 | 
							aveVelocity = aveVelocity / c; | 
				
			||||
 | 
							aveAngularVelocity = aveAngularVelocity / c; | 
				
			||||
 | 
							c = c; | 
				
			||||
 | 
						} | 
				
			||||
 | 
						public Vector3 SnapTo(Vector3 snapPosition) | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							snapPosition.y = transform.position.y; | 
				
			||||
 | 
							var snapDistance = snapPosition-transform.position; | 
				
			||||
 | 
							transform.position = snapPosition; | 
				
			||||
 | 
							_snapOffset += snapDistance; | 
				
			||||
 | 
							return snapDistance; | 
				
			||||
 | 
						} | 
				
			||||
 | 
						public List<Rigidbody> GetRigidBodies() | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							LazyInitialize(); | 
				
			||||
 | 
							return GetComponentsInChildren<Rigidbody>().ToList(); | 
				
			||||
 | 
						} | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: efc73e620e6b44de198ad1fc443291bb | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,66 @@ | 
				
			|||||
 | 
					using System; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class MapRagdoll2Anim : MonoBehaviour | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					//this class does exactly the symetrical of MocapControllerArtanim: it maps animations from a ragdoll to a rigged character
 | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						[SerializeField] | 
				
			||||
 | 
						ArticulationBody _articulationBodyRoot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						List<Transform> _animTransforms; | 
				
			||||
 | 
						List<Transform> _ragdollTransforms; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						//to generate an environment automatically from a rigged character and an animation (see folder ROM-extraction)
 | 
				
			||||
 | 
						public ArticulationBody ArticulationBodyRoot | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							set => _articulationBodyRoot = value; | 
				
			||||
 | 
							get => _articulationBodyRoot; | 
				
			||||
 | 
						} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						// use LateUpdate as physics runs at 2x and we only need to run once per render
 | 
				
			||||
 | 
						private void LateUpdate() | 
				
			||||
 | 
						{ | 
				
			||||
 | 
							// MimicAnimationArtanim();
 | 
				
			||||
 | 
							if (_animTransforms == null) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								var ragdollTransforms =  | 
				
			||||
 | 
									_articulationBodyRoot.GetComponentsInChildren<Transform>() | 
				
			||||
 | 
									.Where(x=>x.name.StartsWith("articulation")) | 
				
			||||
 | 
									.ToList(); | 
				
			||||
 | 
								var ragdollNames = ragdollTransforms | 
				
			||||
 | 
									.Select(x=>x.name) | 
				
			||||
 | 
									.ToList(); | 
				
			||||
 | 
								var animNames = ragdollNames | 
				
			||||
 | 
									.Select(x=>x.Replace("articulation:","")) | 
				
			||||
 | 
									.ToList(); | 
				
			||||
 | 
								var animTransforms = animNames | 
				
			||||
 | 
									.Select(x=>GetComponentsInChildren<Transform>().FirstOrDefault(y=>y.name == x)) | 
				
			||||
 | 
									.Where(x=>x!=null) | 
				
			||||
 | 
									.ToList(); | 
				
			||||
 | 
								_animTransforms = new List<Transform>(); | 
				
			||||
 | 
								_ragdollTransforms = new List<Transform>(); | 
				
			||||
 | 
								// first time, copy position and rotation
 | 
				
			||||
 | 
								foreach (var animTransform in animTransforms) | 
				
			||||
 | 
								{ | 
				
			||||
 | 
									var ragdollTransform = ragdollTransforms | 
				
			||||
 | 
										.First(x=>x.name == $"articulation:{animTransform.name}"); | 
				
			||||
 | 
									animTransform.position = ragdollTransform.position; | 
				
			||||
 | 
									animTransform.rotation = ragdollTransform.rotation; | 
				
			||||
 | 
									_animTransforms.Add(animTransform); | 
				
			||||
 | 
									_ragdollTransforms.Add(ragdollTransform); | 
				
			||||
 | 
								} | 
				
			||||
 | 
							} | 
				
			||||
 | 
							// copy position for root (assume first target is root)
 | 
				
			||||
 | 
							_animTransforms[0].position = _ragdollTransforms[0].position; | 
				
			||||
 | 
							// copy rotation
 | 
				
			||||
 | 
							for (int i = 0; i < _animTransforms.Count; i++) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
								_animTransforms[i].rotation = _ragdollTransforms[i].rotation; | 
				
			||||
 | 
							}	 | 
				
			||||
 | 
						} | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 66999d97560d741a482b847c01b03a33 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,148 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using Unity.MLAgents; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using ManyWorlds; | 
				
			||||
 | 
					using UnityEngine.Assertions; | 
				
			||||
 | 
					using Unity.Collections; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class MarConObservations2Learn : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    public string[] JointNames; | 
				
			||||
 | 
					    [Header("Observations")] | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Kinematic character center of mass velocity, Vector3")] | 
				
			||||
 | 
					    public Vector3 MocapCOMVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("RagDoll character center of mass velocity, Vector3")] | 
				
			||||
 | 
					    public Vector3 RagDollCOMVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("User-input desired horizontal CM velocity. Vector2")] | 
				
			||||
 | 
					    public Vector2 InputDesiredHorizontalVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("User-input requests jump, bool")] | 
				
			||||
 | 
					    public bool InputJump; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("User-input requests backflip, bool")] | 
				
			||||
 | 
					    public bool InputBackflip; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("User-input requests stand, bool")] | 
				
			||||
 | 
					    public bool InputStand; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("User-input requests walk or run, bool")] | 
				
			||||
 | 
					    public bool InputWalkOrRun; | 
				
			||||
 | 
					    [Tooltip("Difference between RagDoll character horizontal CM velocity and user-input desired horizontal CM velocity. Vector2")] | 
				
			||||
 | 
					    public Vector2 HorizontalVelocityDifference; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Positions and velocities for subset of bodies")] | 
				
			||||
 | 
					    public Vector3[] DifferenceInPositions; | 
				
			||||
 | 
					    public Vector3[] DifferenceInVelocities; | 
				
			||||
 | 
					    public float[] DifferenceInDofRotationWithinRangeOfMotion; | 
				
			||||
 | 
					    public float[] DifferenceInDofAngularVelocity; | 
				
			||||
 | 
					    public float[] DifferenceInDofRotationInRad; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Smoothed actions produced in the previous step of the policy are collected in t −1")] | 
				
			||||
 | 
					    public float[] PreviousActions; | 
				
			||||
 | 
					     | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    MarConObservationsStats _mocapStats; | 
				
			||||
 | 
					    MarConObservationsStats _ragdollStats; | 
				
			||||
 | 
					    ArticulationBody[] _joints; | 
				
			||||
 | 
					    InputController _inputController; | 
				
			||||
 | 
					    SpawnableEnv _spawnableEnv; | 
				
			||||
 | 
					    public void OnAgentInitialize(GameObject ragdoll, MapAnim2Ragdoll mocap, ArticulationBody[] joints) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        joints = joints | 
				
			||||
 | 
					            .Where(x => x.jointType == ArticulationJointType.SphericalJoint) | 
				
			||||
 | 
					            .Where(x => !x.isRoot) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					        JointNames = joints | 
				
			||||
 | 
					            .Select(x=>x.name) | 
				
			||||
 | 
					            .Select(x=>x.Replace("articulation:", "")) | 
				
			||||
 | 
					            .Select(x=>x.Replace("mixamorig:", "")) | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					        var articulationRoot = GetComponentsInChildren<ArticulationBody>() | 
				
			||||
 | 
					            .First(x=>x.isRoot); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _spawnableEnv = GetComponentInParent<SpawnableEnv>(); | 
				
			||||
 | 
					        _inputController = _spawnableEnv.GetComponentInChildren<InputController>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _joints = joints; | 
				
			||||
 | 
					        _mocapStats = new GameObject("MocapObservationStats").AddComponent<MarConObservationsStats>(); | 
				
			||||
 | 
					        _ragdollStats = new GameObject("RagdollObservationStats").AddComponent<MarConObservationsStats>(); | 
				
			||||
 | 
					        _mocapStats.transform.SetParent(_spawnableEnv.transform); | 
				
			||||
 | 
					        _ragdollStats.transform.SetParent(_spawnableEnv.transform); | 
				
			||||
 | 
					        _mocapStats.OnAgentInitialize(mocap.transform, _joints, articulationRoot); | 
				
			||||
 | 
					        _ragdollStats.OnAgentInitialize(ragdoll.transform, _joints, articulationRoot); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        int dof = 0; | 
				
			||||
 | 
					        foreach (var m in joints) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (m.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                dof++; | 
				
			||||
 | 
					            if (m.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                dof++; | 
				
			||||
 | 
					            if (m.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                dof++; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        PreviousActions = Enumerable.Range(0,dof).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					        DifferenceInPositions = Enumerable.Range(0,_mocapStats.Positions.Length).Select(x=>Vector3.zero).ToArray(); | 
				
			||||
 | 
					        DifferenceInVelocities = Enumerable.Range(0,_mocapStats.Positions.Length).Select(x=>Vector3.zero).ToArray(); | 
				
			||||
 | 
					        DifferenceInDofRotationWithinRangeOfMotion = Enumerable.Range(0,dof).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					        DifferenceInDofAngularVelocity = Enumerable.Range(0,dof).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					        DifferenceInDofRotationInRad = Enumerable.Range(0,dof).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void OnStep(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        _mocapStats.OnStep(timeDelta); | 
				
			||||
 | 
					        _ragdollStats.OnStep(timeDelta); | 
				
			||||
 | 
					        MocapCOMVelocity = _mocapStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        RagDollCOMVelocity = _ragdollStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        InputDesiredHorizontalVelocity = new Vector2( | 
				
			||||
 | 
					            _ragdollStats.DesiredCenterOfMassVelocity.x, | 
				
			||||
 | 
					            _ragdollStats.DesiredCenterOfMassVelocity.z); | 
				
			||||
 | 
					        if (_inputController != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            InputJump = _inputController.Jump; | 
				
			||||
 | 
					            InputBackflip = _inputController.Backflip; | 
				
			||||
 | 
					            InputStand = _inputController.Stand; | 
				
			||||
 | 
					            InputWalkOrRun = _inputController.WalkOrRun; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        HorizontalVelocityDifference = new Vector2( | 
				
			||||
 | 
					            _ragdollStats.CenterOfMassVelocityDifference.x, | 
				
			||||
 | 
					            _ragdollStats.CenterOfMassVelocityDifference.z); | 
				
			||||
 | 
					        for (int i = 0; i < _mocapStats.Positions.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            DifferenceInPositions[i] = _mocapStats.Positions[i] - _ragdollStats.Positions[i]; | 
				
			||||
 | 
					            DifferenceInVelocities[i] = _mocapStats.Velocities[i] - _ragdollStats.Velocities[i]; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        for (int i = 0; i < _mocapStats.DofRotationWithinRangeOfMotion.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            DifferenceInDofRotationWithinRangeOfMotion[i] =  | 
				
			||||
 | 
					                _mocapStats.DofRotationWithinRangeOfMotion[i] - _ragdollStats.DofRotationWithinRangeOfMotion[i]; | 
				
			||||
 | 
					            DifferenceInDofAngularVelocity[i] =  | 
				
			||||
 | 
					                _mocapStats.DofAngularVelocity[i] - _ragdollStats.DofAngularVelocity[i]; | 
				
			||||
 | 
					            DifferenceInDofRotationInRad[i] =  | 
				
			||||
 | 
					                _mocapStats.DofRotationInRad[i] - _ragdollStats.DofRotationInRad[i]; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    }     | 
				
			||||
 | 
					    public void OnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // _mocapStats.OnReset();
 | 
				
			||||
 | 
					        // _RagdollStats.OnReset();
 | 
				
			||||
 | 
					        _ragdollStats.transform.position = _mocapStats.transform.position; | 
				
			||||
 | 
					        _ragdollStats.transform.rotation = _mocapStats.transform.rotation; | 
				
			||||
 | 
					        var timeDelta = float.MinValue; | 
				
			||||
 | 
					        OnStep(timeDelta); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public MarConObservationsStats GetRagdollStats() => _ragdollStats; | 
				
			||||
 | 
					    public Transform GetRagDollCOM() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        return _ragdollStats.transform; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 9af1acc9cb24942f18be90d74f309aa7 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,363 @@ | 
				
			|||||
 | 
					using System; | 
				
			||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					using ManyWorlds; | 
				
			||||
 | 
					using Unity.Collections; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class MarConObservationsStats : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    [Header("Anchor stats")] | 
				
			||||
 | 
					    public Vector3 HorizontalDirection; // Normalized vector in direction of travel (assume right angle to floor)
 | 
				
			||||
 | 
					    public Vector3 AngualrVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Stats, relative to HorizontalDirection & Center Of Mass")] | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocity; | 
				
			||||
 | 
					    public Vector3 CenterOfMassHorizontalVelocity; | 
				
			||||
 | 
					    public float CenterOfMassVelocityMagnitude; | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocityInRootSpace; | 
				
			||||
 | 
					    public float CenterOfMassVelocityMagnitudeInRootSpace; | 
				
			||||
 | 
					    public float CenterOfMassHorizontalVelocityMagnitude; | 
				
			||||
 | 
					    public Vector3 DesiredCenterOfMassVelocity; | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocityDifference; | 
				
			||||
 | 
					    [HideInInspector] public Vector3 LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					    [HideInInspector] public Quaternion LastRotation; | 
				
			||||
 | 
					    [Header("Stats, in local joint space")] | 
				
			||||
 | 
					    public float[] DofRotationWithinRangeOfMotion; | 
				
			||||
 | 
					    public float[] DofAngularVelocity; | 
				
			||||
 | 
					    public float[] DofRotationInRad; | 
				
			||||
 | 
					    [HideInInspector] public float[] DofLastRotationInRad;     | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    ArticulationBody[] _articulationBodyJoints; | 
				
			||||
 | 
					    Rigidbody[] _rigidBodyJoints; | 
				
			||||
 | 
					    GameObject[] _jointsToTrack; | 
				
			||||
 | 
					    Collider[] _collidersToTrack; | 
				
			||||
 | 
					    GameObject[] _jointForTrackedColliders; | 
				
			||||
 | 
					    public Vector3[] Positions; | 
				
			||||
 | 
					    public Quaternion[] Rotations; | 
				
			||||
 | 
					    public Vector3[] Velocities; | 
				
			||||
 | 
					    public Vector3[] AngualrVelocities; | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    public Vector3[] LastLocalPositions; | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    public Quaternion[] LastLocalRotations; | 
				
			||||
 | 
					    bool LastIsSet; | 
				
			||||
 | 
					    MapAnim2Ragdoll _mapAnim2Ragdoll; | 
				
			||||
 | 
					    GameObject _root; | 
				
			||||
 | 
					    IAnimationController _animationController; | 
				
			||||
 | 
					    SpawnableEnv _spawnableEnv; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnAgentInitialize( | 
				
			||||
 | 
					        Transform defaultTransform,  | 
				
			||||
 | 
					        ArticulationBody[] articulationBodyJoints, | 
				
			||||
 | 
					        ArticulationBody articulationBodyRoot) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        _mapAnim2Ragdoll = defaultTransform.GetComponent<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					        _spawnableEnv = GetComponentInParent<SpawnableEnv>(); | 
				
			||||
 | 
					        _animationController = _spawnableEnv.GetComponentInChildren<IAnimationController>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        var jointNames = articulationBodyJoints | 
				
			||||
 | 
					            .Select(x=>x.name) | 
				
			||||
 | 
					            .Select(x=>x.Replace("articulation:", "")) | 
				
			||||
 | 
					            .Select(x=>x.Replace("mixamorig:", "")) | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					        _articulationBodyJoints = articulationBodyJoints; | 
				
			||||
 | 
					        _rigidBodyJoints = GetComponentsInChildren<Rigidbody>(); | 
				
			||||
 | 
					        if (_rigidBodyJoints.Length > 0) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _jointsToTrack = jointNames | 
				
			||||
 | 
					                .Select(x=>_rigidBodyJoints.First(y => y.name.EndsWith(x))) | 
				
			||||
 | 
					                .Select(x=>x.gameObject) | 
				
			||||
 | 
					                .ToArray(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _jointsToTrack = jointNames | 
				
			||||
 | 
					                .Select(x=>articulationBodyJoints.First(y => y.name.EndsWith(x))) | 
				
			||||
 | 
					                .Select(x=>x.gameObject) | 
				
			||||
 | 
					                .ToArray(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        _collidersToTrack = _jointsToTrack | 
				
			||||
 | 
					            .SelectMany(x=>x.GetComponentsInChildren<Collider>()) | 
				
			||||
 | 
					            .Where(x => x.enabled) | 
				
			||||
 | 
					            .Where(x => !x.isTrigger) | 
				
			||||
 | 
					            .Where(x=> { | 
				
			||||
 | 
					                var ignoreCollider = x.GetComponent<IgnoreColliderForObservation>(); | 
				
			||||
 | 
					                if (ignoreCollider == null) | 
				
			||||
 | 
					                    return true; | 
				
			||||
 | 
					                return !ignoreCollider.enabled;}) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (_rigidBodyJoints.Length > 0) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _jointForTrackedColliders = _collidersToTrack | 
				
			||||
 | 
					                .Select(x=>x.GetComponentsInParent<Rigidbody>().First()) | 
				
			||||
 | 
					                .Select(x=>x.gameObject) | 
				
			||||
 | 
					                .ToArray(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _jointForTrackedColliders = _collidersToTrack | 
				
			||||
 | 
					                .Select(x=>x.GetComponentsInParent<ArticulationBody>().First()) | 
				
			||||
 | 
					                .Select(x=>x.gameObject) | 
				
			||||
 | 
					                .ToArray(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        Positions = Enumerable.Range(0, _collidersToTrack.Length).Select(x=>Vector3.zero).ToArray(); | 
				
			||||
 | 
					        Rotations = Enumerable.Range(0, _collidersToTrack.Length).Select(x=>Quaternion.identity).ToArray(); | 
				
			||||
 | 
					        Velocities = Enumerable.Range(0, _collidersToTrack.Length).Select(x=>Vector3.zero).ToArray(); | 
				
			||||
 | 
					        AngualrVelocities = Enumerable.Range(0, _collidersToTrack.Length).Select(x=>Vector3.zero).ToArray(); | 
				
			||||
 | 
					        LastLocalPositions = Enumerable.Range(0, _collidersToTrack.Length).Select(x=>Vector3.zero).ToArray(); | 
				
			||||
 | 
					        LastLocalRotations = Enumerable.Range(0, _collidersToTrack.Length).Select(x=>Quaternion.identity).ToArray(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        int dof = 0; | 
				
			||||
 | 
					        foreach (var m in _articulationBodyJoints) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (m.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                dof++; | 
				
			||||
 | 
					            if (m.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                dof++; | 
				
			||||
 | 
					            if (m.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                dof++; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        DofRotationWithinRangeOfMotion = Enumerable.Range(0, dof).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					        DofAngularVelocity = Enumerable.Range(0, dof).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					        DofRotationInRad = Enumerable.Range(0, dof).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					        DofLastRotationInRad = Enumerable.Range(0, dof).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (_root == null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Debug.Log("in game object: " + name + "my rootname is: " + articulationBodyRoot.name); | 
				
			||||
 | 
					            if (_rigidBodyJoints.Length > 0) | 
				
			||||
 | 
					                _root = _rigidBodyJoints.First(x => x.name == articulationBodyRoot.name).gameObject; | 
				
			||||
 | 
					            else | 
				
			||||
 | 
					                _root = articulationBodyRoot.gameObject; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        transform.position = defaultTransform.position; | 
				
			||||
 | 
					        transform.rotation = defaultTransform.rotation; | 
				
			||||
 | 
					        LastIsSet = false; | 
				
			||||
 | 
					    }     | 
				
			||||
 | 
					    public void OnStep(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // get Center Of Mass velocity in f space
 | 
				
			||||
 | 
					        Vector3 newCOM; | 
				
			||||
 | 
					        // if Moocap, then get from anim2Ragdoll
 | 
				
			||||
 | 
					        if (_mapAnim2Ragdoll != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            newCOM = _mapAnim2Ragdoll.LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					            var newHorizontalDirection = _mapAnim2Ragdoll.HorizontalDirection; | 
				
			||||
 | 
					            HorizontalDirection = newHorizontalDirection / 180f; | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            transform.position = newCOM; | 
				
			||||
 | 
					            transform.rotation = Quaternion.Euler(newHorizontalDirection); | 
				
			||||
 | 
					            CenterOfMassVelocity = _mapAnim2Ragdoll.CenterOfMassVelocity; | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitude = _mapAnim2Ragdoll.CenterOfMassVelocityMagnitude; | 
				
			||||
 | 
					            CenterOfMassVelocityInRootSpace = transform.InverseTransformVector(CenterOfMassVelocity); | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitudeInRootSpace = CenterOfMassVelocityInRootSpace.magnitude; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            newCOM = GetCenterOfMass(); | 
				
			||||
 | 
					            var newHorizontalDirection = new Vector3(0f, _root.transform.eulerAngles.y, 0f); | 
				
			||||
 | 
					            HorizontalDirection = newHorizontalDirection / 180f; | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            transform.position = newCOM; | 
				
			||||
 | 
					            transform.rotation = Quaternion.Euler(newHorizontalDirection); | 
				
			||||
 | 
					            var velocity = newCOM - LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					            velocity /= timeDelta; | 
				
			||||
 | 
					            CenterOfMassVelocity = velocity; | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitude = CenterOfMassVelocity.magnitude; | 
				
			||||
 | 
					            CenterOfMassVelocityInRootSpace = transform.InverseTransformVector(CenterOfMassVelocity); | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitudeInRootSpace = CenterOfMassVelocityInRootSpace.magnitude; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // get Center Of Mass horizontal velocity in f space
 | 
				
			||||
 | 
					        var comHorizontalDirection = new Vector3(CenterOfMassVelocity.x, 0f, CenterOfMassVelocity.z); | 
				
			||||
 | 
					        CenterOfMassHorizontalVelocity = transform.InverseTransformVector(comHorizontalDirection); | 
				
			||||
 | 
					        CenterOfMassHorizontalVelocityMagnitude = CenterOfMassHorizontalVelocity.magnitude; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // get Desired Center Of Mass horizontal velocity in f space
 | 
				
			||||
 | 
					        Vector3 desiredCom = _animationController.GetDesiredVelocity(); | 
				
			||||
 | 
					        DesiredCenterOfMassVelocity = transform.InverseTransformVector(desiredCom); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // get Desired Center Of Mass horizontal velocity in f space
 | 
				
			||||
 | 
					        CenterOfMassVelocityDifference = DesiredCenterOfMassVelocity - CenterOfMassHorizontalVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!LastIsSet) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            LastRotation = transform.rotation; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        AngualrVelocity = Utils.GetAngularVelocity(LastRotation, transform.rotation, timeDelta); | 
				
			||||
 | 
					        LastRotation = transform.rotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        TrackUsingColliders(timeDelta); | 
				
			||||
 | 
					        // TrackUsingJointsForTrackedColliders(timeDelta);
 | 
				
			||||
 | 
					        TrackUsingDof(timeDelta); | 
				
			||||
 | 
					         | 
				
			||||
 | 
					        LastIsSet = true;         | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void TrackUsingJointsForTrackedColliders(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // track in local space
 | 
				
			||||
 | 
					        for (int i = 0; i < _jointForTrackedColliders.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Transform joint = _jointForTrackedColliders[i].transform; | 
				
			||||
 | 
					            Vector3 worldPosition = joint.position; | 
				
			||||
 | 
					            Quaternion worldRotation = transform.rotation; | 
				
			||||
 | 
					            Vector3 localPosition = transform.InverseTransformPoint(worldPosition); | 
				
			||||
 | 
					            Quaternion localRotation = Utils.FromToRotation(transform.rotation, worldRotation); | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                LastLocalPositions[i] = localPosition; | 
				
			||||
 | 
					                LastLocalRotations[i] = localRotation; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Positions[i] = localPosition; | 
				
			||||
 | 
					            Rotations[i] = localRotation; | 
				
			||||
 | 
					            Velocities[i] = (localPosition - LastLocalPositions[i]) / timeDelta; | 
				
			||||
 | 
					            AngualrVelocities[i] = Utils.GetAngularVelocity(LastLocalRotations[i], localRotation, timeDelta); | 
				
			||||
 | 
					            LastLocalPositions[i] = localPosition; | 
				
			||||
 | 
					            LastLocalRotations[i] = localRotation; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void TrackUsingColliders(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // track in local space
 | 
				
			||||
 | 
					        for (int i = 0; i < _collidersToTrack.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Vector3 c = Vector3.zero; | 
				
			||||
 | 
					            CapsuleCollider capsule = _collidersToTrack[i] as CapsuleCollider; | 
				
			||||
 | 
					            BoxCollider box = _collidersToTrack[i] as BoxCollider; | 
				
			||||
 | 
					            SphereCollider sphere = _collidersToTrack[i] as SphereCollider; | 
				
			||||
 | 
					            Bounds b = new Bounds(c, c); | 
				
			||||
 | 
					            if (capsule != null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                c = capsule.center; | 
				
			||||
 | 
					                var r = capsule.radius * 2; | 
				
			||||
 | 
					                var h = capsule.height; | 
				
			||||
 | 
					                h = Mathf.Max(r, h); // capsules height is clipped at r
 | 
				
			||||
 | 
					                if (capsule.direction == 0) | 
				
			||||
 | 
					                    b = new Bounds(c, new Vector3(h, r, r)); | 
				
			||||
 | 
					                else if (capsule.direction == 1) | 
				
			||||
 | 
					                    b = new Bounds(c, new Vector3(r, h, r)); | 
				
			||||
 | 
					                else if (capsule.direction == 2) | 
				
			||||
 | 
					                    b = new Bounds(c, new Vector3(r, r, h)); | 
				
			||||
 | 
					                else throw new NotImplementedException(); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else if (box != null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                c = box.center; | 
				
			||||
 | 
					                b = new Bounds(c, box.size); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else if (sphere != null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                c = sphere.center; | 
				
			||||
 | 
					                var r = sphere.radius * 2; | 
				
			||||
 | 
					                b = new Bounds(c, new Vector3(r, r, r)); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else | 
				
			||||
 | 
					                throw new NotImplementedException(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Vector3 worldPosition = _collidersToTrack[i].transform.TransformPoint(c); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Quaternion worldRotation = _collidersToTrack[i].transform.rotation; | 
				
			||||
 | 
					            Vector3 localPosition = transform.InverseTransformPoint(worldPosition); | 
				
			||||
 | 
					            Quaternion localRotation = Utils.FromToRotation(transform.rotation, worldRotation); | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                LastLocalPositions[i] = localPosition; | 
				
			||||
 | 
					                LastLocalRotations[i] = localRotation; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Positions[i] = localPosition; | 
				
			||||
 | 
					            Rotations[i] = localRotation; | 
				
			||||
 | 
					            Velocities[i] = (localPosition - LastLocalPositions[i]) / timeDelta; | 
				
			||||
 | 
					            AngualrVelocities[i] = Utils.GetAngularVelocity(LastLocalRotations[i], localRotation, timeDelta); | 
				
			||||
 | 
					            LastLocalPositions[i] = localPosition; | 
				
			||||
 | 
					            LastLocalRotations[i] = localRotation; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					     | 
				
			||||
 | 
					    void TrackUsingDof(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // track in local space
 | 
				
			||||
 | 
					        int i = 0; | 
				
			||||
 | 
					        for (int j = 0; j < _jointForTrackedColliders.Length; j++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var joint = _jointsToTrack[j]; | 
				
			||||
 | 
					            var reference = _articulationBodyJoints[j]; | 
				
			||||
 | 
					            Vector3 decomposedRotation = Utils.GetSwingTwist(joint.transform.localRotation); | 
				
			||||
 | 
					            if (reference.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                var drive = reference.xDrive; | 
				
			||||
 | 
					                var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					                var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					                var deg = decomposedRotation.x; | 
				
			||||
 | 
					                var pos = (deg - midpoint) / scale; | 
				
			||||
 | 
					                DofRotationInRad[i] = deg * Mathf.Deg2Rad; | 
				
			||||
 | 
					                DofRotationWithinRangeOfMotion[i++] = pos; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            if (reference.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                var drive = reference.yDrive; | 
				
			||||
 | 
					                var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					                var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					                var deg = decomposedRotation.y; | 
				
			||||
 | 
					                var pos = (deg - midpoint) / scale; | 
				
			||||
 | 
					                DofRotationInRad[i] = deg * Mathf.Deg2Rad; | 
				
			||||
 | 
					                DofRotationWithinRangeOfMotion[i++] = pos; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            if (reference.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                var drive = reference.zDrive; | 
				
			||||
 | 
					                var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					                var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					                var deg = decomposedRotation.z; | 
				
			||||
 | 
					                var pos = (deg - midpoint) / scale; | 
				
			||||
 | 
					                DofRotationInRad[i] = deg * Mathf.Deg2Rad; | 
				
			||||
 | 
					                DofRotationWithinRangeOfMotion[i++] = pos; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        for (i = 0; i < DofRotationInRad.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                DofLastRotationInRad[i] = DofRotationInRad[i]; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            DofAngularVelocity[i] = DofRotationInRad[i] - DofLastRotationInRad[i]; | 
				
			||||
 | 
					            DofAngularVelocity[i] /= timeDelta; | 
				
			||||
 | 
					            DofLastRotationInRad[i] = DofRotationInRad[i]; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    }     | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        OnStep(float.Epsilon); | 
				
			||||
 | 
					        LastIsSet = false; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    Vector3 GetCenterOfMass() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var centerOfMass = Vector3.zero; | 
				
			||||
 | 
					        float totalMass = 0f; | 
				
			||||
 | 
					        foreach (ArticulationBody ab in _articulationBodyJoints) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            centerOfMass += ab.worldCenterOfMass * ab.mass; | 
				
			||||
 | 
					            totalMass += ab.mass; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        centerOfMass /= totalMass; | 
				
			||||
 | 
					        // centerOfMass -= _spawnableEnv.transform.position;
 | 
				
			||||
 | 
					        return centerOfMass; | 
				
			||||
 | 
					    }     | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: cbb599f18ba7f4970aa9c0f7f9b87046 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,702 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					using System; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class Muscles : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    public MotorMode MotorUpdateMode; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [System.Serializable] | 
				
			||||
 | 
					    public class MusclePower | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        public string Muscle; | 
				
			||||
 | 
					        public Vector3 PowerVector; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Parameters for Legacy and PD:")] | 
				
			||||
 | 
					    public List<MusclePower> MusclePowers; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					  //  public float MotorScale = 1f;
 | 
				
			||||
 | 
					    public float Stiffness = 50f; | 
				
			||||
 | 
					    public float Damping = 100f; | 
				
			||||
 | 
					    public float ForceLimit = float.MaxValue; | 
				
			||||
 | 
					    public float DampingRatio = 1.0f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Extra Parameters for PD:")] | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public float NaturalFrequency = 40f; | 
				
			||||
 | 
					    public float ForceScale = .3f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Parameters for StablePD:")] | 
				
			||||
 | 
					    public float KP_Stiffness = 50; | 
				
			||||
 | 
					    public float ForceScaleSPD = .3f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Debug Collisions")] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    bool skipCollisionSetup; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Debug Values, Read Only")] | 
				
			||||
 | 
					    public bool updateDebugValues; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Vector3[] jointVelocityInReducedSpace; | 
				
			||||
 | 
					    List<ArticulationBody> _motors; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private class LastPos | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        public string name; | 
				
			||||
 | 
					        //public ArticulationReducedSpace pos;
 | 
				
			||||
 | 
					        public ArticulationReducedSpace vel; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    List<LastPos> _lastPos = new List<LastPos>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public enum MotorMode {  | 
				
			||||
 | 
					     | 
				
			||||
 | 
					        legacy, | 
				
			||||
 | 
					        PD, | 
				
			||||
 | 
					        stablePD, | 
				
			||||
 | 
					        force, | 
				
			||||
 | 
					        PDopenloop //this is a PD combined with the kinematic input processed as an openloop, see in DReCon
 | 
				
			||||
 | 
					    | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //for the PDopenloop case:
 | 
				
			||||
 | 
					    public List<Transform> _referenceTransforms; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public delegate void MotorDelegate(ArticulationBody joint, Vector3 targetNormalizedRotation, float actionTimeDelta); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public MotorDelegate UpdateMotor; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //only used in PDopenloop
 | 
				
			||||
 | 
					    public void SetKinematicReference(MapAnim2Ragdoll kinematicRoot)  | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _referenceTransforms = kinematicRoot._ragdollTransforms;     | 
				
			||||
 | 
					     | 
				
			||||
 | 
					     | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Use this for initialization
 | 
				
			||||
 | 
					    void Start() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Setup(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _motors = GetComponentsInChildren<ArticulationBody>() | 
				
			||||
 | 
					                .Where(x => x.jointType == ArticulationJointType.SphericalJoint) | 
				
			||||
 | 
					                .Where(x => !x.isRoot) | 
				
			||||
 | 
					                .Distinct() | 
				
			||||
 | 
					                .ToList(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (ArticulationBody m in _motors) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            LastPos l = new LastPos(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            l.name = m.name; | 
				
			||||
 | 
					            //l.pos = m.jointPosition;
 | 
				
			||||
 | 
					            l.vel = m.jointVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            _lastPos.Add(l); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (updateDebugValues) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            jointVelocityInReducedSpace = new Vector3[_motors.Count]; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        switch (MotorUpdateMode) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            case (MotorMode.force): | 
				
			||||
 | 
					                UpdateMotor = DirectForce; | 
				
			||||
 | 
					                break; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            case (MotorMode.PD): | 
				
			||||
 | 
					                UpdateMotor = UpdateMotorPDWithVelocity; | 
				
			||||
 | 
					                break; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            case (MotorMode.legacy): | 
				
			||||
 | 
					                UpdateMotor = LegacyUpdateMotor; | 
				
			||||
 | 
					                break; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            case (MotorMode.stablePD): | 
				
			||||
 | 
					                UpdateMotor = null; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                //UpdateMotor = StablePD;
 | 
				
			||||
 | 
					                //NOTE: this is not yet working, the implementaiton is in progress
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                break; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            case (MotorMode.PDopenloop): | 
				
			||||
 | 
					                UpdateMotor = UpdateMotorPDopenloop; | 
				
			||||
 | 
					                break; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					          | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Update is called once per frame
 | 
				
			||||
 | 
					    void Update() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (updateDebugValues) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            int i = 0; | 
				
			||||
 | 
					            foreach(ArticulationBody m in _motors) {  | 
				
			||||
 | 
					            //DEBUG: to keep track of the values, and see if they seem reasonable
 | 
				
			||||
 | 
					                | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                Vector3 temp = Utils.GetArticulationReducedSpaceInVector3(m.jointVelocity); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                jointVelocityInReducedSpace[i] = temp; | 
				
			||||
 | 
					                i++; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void Setup() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!skipCollisionSetup) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // handle collision overlaps
 | 
				
			||||
 | 
					            IgnoreCollision("articulation:Spine2", new[] { "LeftArm", "RightArm" }); | 
				
			||||
 | 
					            IgnoreCollision("articulation:Hips", new[] { "RightUpLeg", "LeftUpLeg" }); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            IgnoreCollision("LeftForeArm", new[] { "LeftArm" }); | 
				
			||||
 | 
					            IgnoreCollision("RightForeArm", new[] { "RightArm" }); | 
				
			||||
 | 
					            IgnoreCollision("RightLeg", new[] { "RightUpLeg" }); | 
				
			||||
 | 
					            IgnoreCollision("LeftLeg", new[] { "LeftUpLeg" }); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            IgnoreCollision("RightLeg", new[] { "RightFoot" }); | 
				
			||||
 | 
					            IgnoreCollision("LeftLeg", new[] { "LeftFoot" }); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //
 | 
				
			||||
 | 
					        var joints = GetComponentsInChildren<Joint>().ToList(); | 
				
			||||
 | 
					        foreach (var joint in joints) | 
				
			||||
 | 
					            joint.enablePreprocessing = false; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void IgnoreCollision(string first, string[] seconds) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        foreach (var second in seconds) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            IgnoreCollision(first, second); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void IgnoreCollision(string first, string second) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var rigidbodies = GetComponentsInChildren<Rigidbody>().ToList(); | 
				
			||||
 | 
					        var colliderOnes = rigidbodies.FirstOrDefault(x => x.name.Contains(first))?.GetComponents<Collider>(); | 
				
			||||
 | 
					        var colliderTwos = rigidbodies.FirstOrDefault(x => x.name.Contains(second))?.GetComponents<Collider>(); | 
				
			||||
 | 
					        if (colliderOnes == null || colliderTwos == null) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        foreach (var c1 in colliderOnes) | 
				
			||||
 | 
					            foreach (var c2 in colliderTwos) | 
				
			||||
 | 
					                Physics.IgnoreCollision(c1, c2); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //this is a simple way to center the masses
 | 
				
			||||
 | 
					    public void CenterABMasses() | 
				
			||||
 | 
					    {  | 
				
			||||
 | 
					        ArticulationBody[] abs = GetComponentsInChildren<ArticulationBody>(); | 
				
			||||
 | 
					        foreach (ArticulationBody ab in abs) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (!ab.isRoot) | 
				
			||||
 | 
					            {  | 
				
			||||
 | 
					                Vector3 currentCoF = ab.centerOfMass; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                Vector3 newCoF = Vector3.zero; | 
				
			||||
 | 
					                //generally 1, sometimes 2:
 | 
				
			||||
 | 
					                foreach (Transform child in ab.transform) { | 
				
			||||
 | 
					                    newCoF += child.localPosition; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                } | 
				
			||||
 | 
					                newCoF /= ab.transform.childCount; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                ArticulationBody ab2 = ab.GetComponentInChildren<ArticulationBody>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                newCoF = (ab.transform.parent.localPosition + newCoF) / 2.0f; | 
				
			||||
 | 
					                ab.centerOfMass = newCoF; | 
				
			||||
 | 
					                Debug.Log("AB: " + ab.name + " old CoF: " + currentCoF + " new CoF: " + ab.centerOfMass); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private static Vector3 GetTargetVelocity(ArticulationBody joint, Vector3 targetNormalizedRotation, float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 targetVelocity = new Vector3(0, 0, 0); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 currentRotationValues = Utils.GetSwingTwist(joint.transform.localRotation); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 target = new Vector3(); | 
				
			||||
 | 
					        if (joint.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.xDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            target.x = midpoint + (targetNormalizedRotation.x * scale); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.yDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            target.y = midpoint + (targetNormalizedRotation.y * scale); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.zDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            target.z = midpoint + (targetNormalizedRotation.z * scale); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //this is how you calculate the angular velocity in MapAnim2Ragdoll
 | 
				
			||||
 | 
					        //Utils.GetAngularVelocity(cur, last, timeDelta)
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //Utils.GetArticulationReducedSpaceInVector3(joint.jointVelocity)
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        targetVelocity = Utils.AngularVelocityInReducedCoordinates(Utils.GetSwingTwist(joint.transform.localRotation), target, timeDelta); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        targetVelocity = Vector3.ClampMagnitude(targetVelocity, joint.maxAngularVelocity); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return targetVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void UpdateMotorPDWithVelocity(ArticulationBody joint, Vector3 targetNormalizedRotation, float actionTimeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        var m = joint.mass; | 
				
			||||
 | 
					        var d = DampingRatio; // d should be 0..1.
 | 
				
			||||
 | 
					        var n = NaturalFrequency; // n should be in the range 1..20
 | 
				
			||||
 | 
					        var k = Mathf.Pow(n, 2) * m; | 
				
			||||
 | 
					        var c = d * (2 * Mathf.Sqrt(k * m)); | 
				
			||||
 | 
					        var stiffness = k; | 
				
			||||
 | 
					        var damping = c; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 power = Vector3.zero; | 
				
			||||
 | 
					        try | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            power = MusclePowers.First(x => x.Muscle == joint.name).PowerVector; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        catch | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Debug.Log("there is no muscle for joint " + joint.name); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        classicPD(joint, targetNormalizedRotation, actionTimeDelta, power); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void classicPD(ArticulationBody joint, Vector3 targetNormalizedRotation, float actionTimeDelta, Vector3 power) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        var m = joint.mass; | 
				
			||||
 | 
					        var d = DampingRatio; // d should be 0..1.
 | 
				
			||||
 | 
					        var n = NaturalFrequency; // n should be in the range 1..20
 | 
				
			||||
 | 
					        var k = Mathf.Pow(n, 2) * m; | 
				
			||||
 | 
					        var c = d * (2 * Mathf.Sqrt(k * m)); | 
				
			||||
 | 
					        var stiffness = k; | 
				
			||||
 | 
					        var damping = c; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //why do you never set up the targetVelocity?
 | 
				
			||||
 | 
					        // F = stiffness * (currentPosition - target) - damping * (currentVelocity - targetVelocity)
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 targetVel = GetTargetVelocity(joint, targetNormalizedRotation, actionTimeDelta); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.xDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.x * scale); | 
				
			||||
 | 
					            drive.target = target; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            drive.targetVelocity = targetVel.x; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            drive.stiffness = stiffness; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = power.x * ForceScale; | 
				
			||||
 | 
					            joint.xDrive = drive; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.yDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.y * scale); | 
				
			||||
 | 
					            drive.target = target; | 
				
			||||
 | 
					            // drive.targetVelocity = (target - currentRotationValues.y) / (_decisionPeriod * Time.fixedDeltaTime);
 | 
				
			||||
 | 
					            drive.targetVelocity = targetVel.y; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            drive.stiffness = stiffness; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = power.y * ForceScale; | 
				
			||||
 | 
					            joint.yDrive = drive; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.zDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.z * scale); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            drive.target = target; | 
				
			||||
 | 
					            //drive.targetVelocity = (target - currentRotationValues.z) / (_decisionPeriod * Time.fixedDeltaTime);
 | 
				
			||||
 | 
					            drive.targetVelocity = targetVel.z; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            drive.stiffness = stiffness; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = power.z * ForceScale; | 
				
			||||
 | 
					            joint.zDrive = drive; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void UpdateMotorPDopenloop(ArticulationBody joint, Vector3 targetRot, float actionTimeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 refRot = Mathf.Deg2Rad * Utils.GetSwingTwist( _referenceTransforms.First(x => x.name == joint.name).localRotation); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 power = 40* Vector3.one; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 targetNormalizedRotation = refRot + targetRot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //From the DReCon paper: (not implemented)
 | 
				
			||||
 | 
					    //    Velocity basedconstraints are used to simulate PD servo motors at the joints,
 | 
				
			||||
 | 
					    //    withmotor constraint torques clamped to 200 Nm.All coeicients of fric-tion
 | 
				
			||||
 | 
					    //    are given a value of 1, except rolling friction which is disabled.
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					       classicPD(joint, targetNormalizedRotation, actionTimeDelta, power); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void LegacyUpdateMotor(ArticulationBody joint, Vector3 targetNormalizedRotation,  float actionTimeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 power = Vector3.zero; | 
				
			||||
 | 
					        try | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            power = MusclePowers.First(x => x.Muscle == joint.name).PowerVector; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        catch | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Debug.Log("there is no muscle for joint " + joint.name); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        power *= Stiffness; | 
				
			||||
 | 
					        float damping = Damping; | 
				
			||||
 | 
					        float forceLimit = ForceLimit; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.xDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.x * scale); | 
				
			||||
 | 
					            drive.target = target; | 
				
			||||
 | 
					            drive.stiffness = power.x; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = forceLimit; | 
				
			||||
 | 
					            joint.xDrive = drive; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.yDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.y * scale); | 
				
			||||
 | 
					            drive.target = target; | 
				
			||||
 | 
					            drive.stiffness = power.y; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = forceLimit; | 
				
			||||
 | 
					            joint.yDrive = drive; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var drive = joint.zDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.z * scale); | 
				
			||||
 | 
					            drive.target = target; | 
				
			||||
 | 
					            drive.stiffness = power.z; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = forceLimit; | 
				
			||||
 | 
					            joint.zDrive = drive; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //NOT TESTED
 | 
				
			||||
 | 
					    void DirectForce(ArticulationBody joint, Vector3 targetNormalizedRotation, float actionTimeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					         | 
				
			||||
 | 
					        Vector3 result = 0.05f * targetNormalizedRotation; | 
				
			||||
 | 
					        joint.AddRelativeTorque(result); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    static ArticulationReducedSpace AccelerationInReducedSpace(ArticulationReducedSpace currentVel, ArticulationReducedSpace lastVel, float deltaTime) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        ArticulationReducedSpace result = new ArticulationReducedSpace(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        result.dofCount = currentVel.dofCount; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        for(int i = 0; i< result.dofCount; i++) | 
				
			||||
 | 
					            result[i] =  (currentVel[i] - lastVel[i]) / deltaTime; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return result; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void StablePD(ArticulationBody joint, Vector3 input, float actionTimeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 targetNormalizedRotation =  input; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //A PD controller uses:
 | 
				
			||||
 | 
					        // F = stiffness * (currentPosition - target) - damping * (currentVelocity - targetVelocity)
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //A stable PD controller, instead:
 | 
				
			||||
 | 
					        //f =  - Kp (pos + dt* v -targetPos)- Kd(v + dt*a )
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //kd towards infinity
 | 
				
			||||
 | 
					        //kd = kp * dt
 | 
				
			||||
 | 
					        //Kd >= Kp * dt to ensure stability
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //example in video: KP = 30.000,  KD 600, update 1/60
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //float Kp = 30000;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        LastPos lastPos = null; | 
				
			||||
 | 
					        try | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            lastPos = _lastPos.First(x => x.name.Equals(joint.name)); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        catch | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Debug.Log("there is no lastPos for joint " + joint.name); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        float Kp = KP_Stiffness; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        float Kd = Kp * actionTimeDelta; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //Vector3 currentSwingTwist = Utils.GetSwingTwist(joint.transform.localRotation);
 | 
				
			||||
 | 
					        //Vector3 targetVelocity = Utils.AngularVelocityInReducedCoordinates(currentSwingTwist, targetNormalizedRotation, actionTimeDelta);
 | 
				
			||||
 | 
					        //Vector3 currentVelocity = Utils.GetArticulationReducedSpaceInVector3(joint.jointVelocity);
 | 
				
			||||
 | 
					        //        Vector3 targetAcceleration = Utils.AngularVelocityInReducedCoordinates(currentVelocity, targetVelocity, actionTimeDelta);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ArticulationReducedSpace forceInReducedSpace = new ArticulationReducedSpace(); | 
				
			||||
 | 
					        forceInReducedSpace.dofCount = joint.dofCount; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ArticulationReducedSpace acceleration = AccelerationInReducedSpace(joint.jointVelocity, lastPos.vel, actionTimeDelta); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        | 
				
			||||
 | 
					    | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.twistLock == ArticulationDofLock.LimitedMotion) { | 
				
			||||
 | 
					            //f =  - Kp (pos + dt* v -targetPos)- Kd(v + dt*a )
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //forceInReducedSpace[0] = -Kp * (currentSwingTwist.x + actionTimeDelta * currentVelocity.x - targetNormalizedRotation.x) - Kd * (currentVelocity.x + actionTimeDelta * targetAcceleration.x);
 | 
				
			||||
 | 
					            var drive = joint.xDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.x * scale); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            forceInReducedSpace[0] = -Kp * (joint.jointPosition[0] + actionTimeDelta * joint.jointVelocity[0] - target) - Kd * (joint.jointVelocity[0] + actionTimeDelta * acceleration[0]); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            forceInReducedSpace[0] *= ForceScaleSPD;  | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					         } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            //f =  - Kp (pos + dt* v -targetPos)- Kd(v + dt*a )
 | 
				
			||||
 | 
					            // forceInReducedSpace[1] = -Kp * (currentSwingTwist.y + actionTimeDelta * currentVelocity.y - targetNormalizedRotation.y) - Kd * (currentVelocity.y + actionTimeDelta * targetAcceleration.y);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            var drive = joint.yDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.y * scale); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if(joint.dofCount == 1) {  | 
				
			||||
 | 
					               // forceInReducedSpace[0] = -Kp * (Mathf.Deg2Rad * joint.jointPosition[0] + actionTimeDelta * Mathf.Deg2Rad * joint.jointVelocity[0] - target) - Kd * (Mathf.Deg2Rad * joint.jointVelocity[0] + actionTimeDelta * Mathf.Deg2Rad * acceleration[0]);
 | 
				
			||||
 | 
					               // forceInReducedSpace[0] *= ForceScaleSPD;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else {  | 
				
			||||
 | 
					                forceInReducedSpace[1] = -Kp * (Mathf.Deg2Rad *  joint.jointPosition[1] + actionTimeDelta * Mathf.Deg2Rad * joint.jointVelocity[1] - target) - Kd * (Mathf.Deg2Rad *  joint.jointVelocity[1] + actionTimeDelta * Mathf.Deg2Rad * acceleration[1]); | 
				
			||||
 | 
					                forceInReducedSpace[1] *= ForceScaleSPD; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            //f =  - Kp (pos + dt* v -targetPos)- Kd(v + dt*a )
 | 
				
			||||
 | 
					            //   forceInReducedSpace[2] = -Kp * (currentSwingTwist.z + actionTimeDelta * currentVelocity.z - targetNormalizedRotation.z) - Kd * (currentVelocity.z + actionTimeDelta * targetAcceleration.z);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            var drive = joint.zDrive; | 
				
			||||
 | 
					            var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					            var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					            var target = midpoint + (targetNormalizedRotation.z * scale); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            forceInReducedSpace[2] = -Kp * (Mathf.Deg2Rad * joint.jointPosition[2] + actionTimeDelta * Mathf.Deg2Rad * joint.jointVelocity[2] - target) - Kd * (Mathf.Deg2Rad *  joint.jointVelocity[2] + actionTimeDelta * Mathf.Deg2Rad * acceleration[2]); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            forceInReducedSpace[2] *= ForceScaleSPD; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Vector3 result = Utils.GetArticulationReducedSpaceInVector3(forceInReducedSpace);
 | 
				
			||||
 | 
					        Vector3 result =KP_Stiffness* input; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (joint.dofCount < 3) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            result = Vector3.zero; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					         joint.AddRelativeTorque(result); | 
				
			||||
 | 
					        //joint.AddRelativeTorque(Vector3.zero);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // joint.jointForce =  forceInReducedSpace;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        lastPos.vel = joint.jointVelocity; | 
				
			||||
 | 
					        //lastPos.pos = joint.jointPosition;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 652394cd365ee4cd0b8f8318777d8161 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,344 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using Unity.MLAgents; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using ManyWorlds; | 
				
			||||
 | 
					using UnityEngine.Assertions; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class Observations2Learn : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    [Header("Observations")] | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Kinematic character center of mass velocity, Vector3")] | 
				
			||||
 | 
					    public Vector3 MocapCOMVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("RagDoll character center of mass velocity, Vector3")] | 
				
			||||
 | 
					    public Vector3 RagDollCOMVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("User-input desired horizontal CM velocity. Vector2")] | 
				
			||||
 | 
					    public Vector2 InputDesiredHorizontalVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("User-input requests jump, bool")] | 
				
			||||
 | 
					    public bool InputJump; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("User-input requests backflip, bool")] | 
				
			||||
 | 
					    public bool InputBackflip; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Difference between RagDoll character horizontal CM velocity and user-input desired horizontal CM velocity. Vector2")] | 
				
			||||
 | 
					    public Vector2 HorizontalVelocityDifference; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Positions and velocities for subset of bodies")] | 
				
			||||
 | 
					    public List<BodyPartDifferenceStats> BodyPartDifferenceStats; | 
				
			||||
 | 
					    public List<ObservationStats.Stat> MocapBodyStats; | 
				
			||||
 | 
					    public List<ObservationStats.Stat> RagDollBodyStats; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Smoothed actions produced in the previous step of the policy are collected in t −1")] | 
				
			||||
 | 
					    public float[] PreviousActions; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //[Tooltip("RagDoll ArticulationBody joint positions in reduced space")]
 | 
				
			||||
 | 
					    //public float[] RagDollJointPositions;
 | 
				
			||||
 | 
					//    [Tooltip("RagDoll ArticulationBody joint velocity in reduced space")]
 | 
				
			||||
 | 
					//    public float[] RagDollJointVelocities;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					  //  [Tooltip("RagDoll ArticulationBody joint accelerations in reduced space")]
 | 
				
			||||
 | 
					  //  public float[] RagDollJointAccelerations;
 | 
				
			||||
 | 
					    [Tooltip("RagDoll ArticulationBody joint forces in reduced space")] | 
				
			||||
 | 
					    public float[] RagDollJointForces; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Macap: ave of joint angular velocity")] | 
				
			||||
 | 
					    public float EnergyAngularMocap; | 
				
			||||
 | 
					    [Tooltip("RagDoll: ave of joint angular velocity")] | 
				
			||||
 | 
					    public float EnergyAngularRagDoll; | 
				
			||||
 | 
					    [Tooltip("RagDoll-Macap: ave of joint angular velocity")] | 
				
			||||
 | 
					    public float EnergyDifferenceAngular; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Macap: ave of joint velocity in local space")] | 
				
			||||
 | 
					    public float EnergyPositionalMocap; | 
				
			||||
 | 
					    [Tooltip("RagDoll: ave of joint velocity in local space")] | 
				
			||||
 | 
					    public float EnergyPositionalRagDoll; | 
				
			||||
 | 
					    [Tooltip("RagDoll-Macap: ave of joint velocity in local space")] | 
				
			||||
 | 
					    public float EnergyDifferencePositional; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Gizmos")] | 
				
			||||
 | 
					    public bool VelocityInWorldSpace = true; | 
				
			||||
 | 
					    public bool PositionInWorldSpace = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public string targetedRootName = "articulation:Hips"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    InputController _inputController; | 
				
			||||
 | 
					    SpawnableEnv _spawnableEnv; | 
				
			||||
 | 
					    ObservationStats _mocapBodyStats; | 
				
			||||
 | 
					    ObservationStats _ragDollBodyStats; | 
				
			||||
 | 
					    bool _hasLazyInitialized; | 
				
			||||
 | 
					    List<ArticulationBody> _motors; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnAgentInitialize() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsFalse(_hasLazyInitialized); | 
				
			||||
 | 
					        _hasLazyInitialized = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _spawnableEnv = GetComponentInParent<SpawnableEnv>(); | 
				
			||||
 | 
					        _inputController = _spawnableEnv.GetComponentInChildren<InputController>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocapBodyStats = new GameObject("MocapDReConObservationStats").AddComponent<ObservationStats>(); | 
				
			||||
 | 
					        _mocapBodyStats.setRootName(targetedRootName); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocapBodyStats.ObjectToTrack = _spawnableEnv.GetComponentInChildren<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocapBodyStats.transform.SetParent(_spawnableEnv.transform); | 
				
			||||
 | 
					        _mocapBodyStats.OnAgentInitialize(_mocapBodyStats.ObjectToTrack.transform); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _ragDollBodyStats = new GameObject("RagDollDReConObservationStats").AddComponent<ObservationStats>(); | 
				
			||||
 | 
					        _ragDollBodyStats.setRootName(targetedRootName); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _ragDollBodyStats.ObjectToTrack = this; | 
				
			||||
 | 
					        _ragDollBodyStats.transform.SetParent(_spawnableEnv.transform); | 
				
			||||
 | 
					        _ragDollBodyStats.OnAgentInitialize(transform); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        BodyPartDifferenceStats = _mocapBodyStats.Stats | 
				
			||||
 | 
					            .Select(x => new BodyPartDifferenceStats { Name = x.Name }) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        int numJoints = 0; | 
				
			||||
 | 
					        _motors = GetComponentsInChildren<ArticulationBody>() | 
				
			||||
 | 
					            .Where(x => x.jointType == ArticulationJointType.SphericalJoint) | 
				
			||||
 | 
					            .Where(x => !x.isRoot) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        foreach (var m in _motors) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (m.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                numJoints++; | 
				
			||||
 | 
					            if (m.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                numJoints++; | 
				
			||||
 | 
					            if (m.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                numJoints++; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        PreviousActions = Enumerable.Range(0,numJoints).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					        //RagDollJointPositions = Enumerable.Range(0,numJoints).Select(x=>0f).ToArray();
 | 
				
			||||
 | 
					       // RagDollJointVelocities = Enumerable.Range(0,numJoints).Select(x=>0f).ToArray();
 | 
				
			||||
 | 
					       // RagDollJointAccelerations = Enumerable.Range(0,numJoints).Select(x=>0f).ToArray();
 | 
				
			||||
 | 
					        RagDollJointForces = Enumerable.Range(0,numJoints).Select(x=>0f).ToArray(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public List<Collider> EstimateBodyPartsForObservation() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var colliders = GetComponentsInChildren<Collider>() | 
				
			||||
 | 
					            .Where(x => x.enabled) | 
				
			||||
 | 
					            .Where(x => !x.isTrigger) | 
				
			||||
 | 
					            .Where(x=> { | 
				
			||||
 | 
					                var ignoreCollider = x.GetComponent<IgnoreColliderForObservation>(); | 
				
			||||
 | 
					                if (ignoreCollider == null) | 
				
			||||
 | 
					                    return true; | 
				
			||||
 | 
					                return !ignoreCollider.enabled;}) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        return colliders; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public List<Collider> EstimateBodyPartsForReward() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var colliders = GetComponentsInChildren<Collider>() | 
				
			||||
 | 
					            .Where(x => x.enabled) | 
				
			||||
 | 
					            .Where(x => !x.isTrigger) | 
				
			||||
 | 
					            .Where(x=> { | 
				
			||||
 | 
					                var ignoreCollider = x.GetComponent<IgnoreColliderForReward>(); | 
				
			||||
 | 
					                if (ignoreCollider == null) | 
				
			||||
 | 
					                    return true; | 
				
			||||
 | 
					                return !ignoreCollider.enabled;}) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        return colliders; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnStep(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasLazyInitialized); | 
				
			||||
 | 
					        _mocapBodyStats.SetStatusForStep(timeDelta); | 
				
			||||
 | 
					        _ragDollBodyStats.SetStatusForStep(timeDelta); | 
				
			||||
 | 
					        UpdateObservations(timeDelta); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void OnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasLazyInitialized); | 
				
			||||
 | 
					        _mocapBodyStats.OnReset(); | 
				
			||||
 | 
					        _ragDollBodyStats.OnReset(); | 
				
			||||
 | 
					        _ragDollBodyStats.transform.position = _mocapBodyStats.transform.position; | 
				
			||||
 | 
					        _ragDollBodyStats.transform.rotation = _mocapBodyStats.transform.rotation; | 
				
			||||
 | 
					        var timeDelta = float.MinValue; | 
				
			||||
 | 
					        UpdateObservations(timeDelta); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void UpdateObservations(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        MocapCOMVelocity = _mocapBodyStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        RagDollCOMVelocity = _ragDollBodyStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        InputDesiredHorizontalVelocity = new Vector2( | 
				
			||||
 | 
					            _ragDollBodyStats.DesiredCenterOfMassVelocity.x, | 
				
			||||
 | 
					            _ragDollBodyStats.DesiredCenterOfMassVelocity.z); | 
				
			||||
 | 
					        if (_inputController != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            InputJump = _inputController.Jump; | 
				
			||||
 | 
					            InputBackflip = _inputController.Backflip; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        HorizontalVelocityDifference = new Vector2( | 
				
			||||
 | 
					            _ragDollBodyStats.CenterOfMassVelocityDifference.x, | 
				
			||||
 | 
					            _ragDollBodyStats.CenterOfMassVelocityDifference.z); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        MocapBodyStats = _mocapBodyStats.Stats.ToList(); | 
				
			||||
 | 
					        RagDollBodyStats = MocapBodyStats | 
				
			||||
 | 
					            .Select(x => _ragDollBodyStats.Stats.First(y => y.Name == x.Name)) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        // BodyPartStats = 
 | 
				
			||||
 | 
					        foreach (var differenceStats in BodyPartDifferenceStats) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var mocapStats = _mocapBodyStats.Stats.First(x => x.Name == differenceStats.Name); | 
				
			||||
 | 
					            var ragDollStats = _ragDollBodyStats.Stats.First(x => x.Name == differenceStats.Name); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            differenceStats.Position = mocapStats.Position - ragDollStats.Position; | 
				
			||||
 | 
					            differenceStats.Velocity = mocapStats.Velocity - ragDollStats.Velocity; | 
				
			||||
 | 
					            differenceStats.AngualrVelocity = mocapStats.AngularVelocity - ragDollStats.AngularVelocity; | 
				
			||||
 | 
					            differenceStats.Rotation = ObservationStats.GetAngularVelocity(mocapStats.Rotation, ragDollStats.Rotation, timeDelta); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        int i = 0; | 
				
			||||
 | 
					        foreach (var m in _motors) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            int j = 0; | 
				
			||||
 | 
					            if (m.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                //RagDollJointPositions[i] = m.jointPosition[j];
 | 
				
			||||
 | 
					              //  RagDollJointVelocities[i] = m.jointVelocity[j];
 | 
				
			||||
 | 
					              //  RagDollJointAccelerations[i] = m.jointAcceleration[j];
 | 
				
			||||
 | 
					                RagDollJointForces[i++] = m.jointForce[j++]; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            if (m.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					              //  RagDollJointPositions[i] = m.jointPosition[j];
 | 
				
			||||
 | 
					             //   RagDollJointVelocities[i] = m.jointVelocity[j];
 | 
				
			||||
 | 
					             //   RagDollJointAccelerations[i] = m.jointAcceleration[j];
 | 
				
			||||
 | 
					                RagDollJointForces[i++] = m.jointForce[j++]; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            if (m.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					              //  RagDollJointPositions[i] = m.jointPosition[j];
 | 
				
			||||
 | 
					              //  RagDollJointVelocities[i] = m.jointVelocity[j];
 | 
				
			||||
 | 
					              //  RagDollJointAccelerations[i] = m.jointAcceleration[j];
 | 
				
			||||
 | 
					                RagDollJointForces[i++] = m.jointForce[j++]; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        EnergyAngularMocap = MocapBodyStats | 
				
			||||
 | 
					            .Select(x=>x.AngularVelocity.magnitude) | 
				
			||||
 | 
					            .Average(); | 
				
			||||
 | 
					        EnergyAngularRagDoll = RagDollBodyStats | 
				
			||||
 | 
					            .Select(x=>x.AngularVelocity.magnitude) | 
				
			||||
 | 
					            .Average(); | 
				
			||||
 | 
					        EnergyDifferenceAngular = RagDollBodyStats | 
				
			||||
 | 
					            .Zip(MocapBodyStats, (x,y) => x.AngularVelocity.magnitude-y.AngularVelocity.magnitude) | 
				
			||||
 | 
					            .Average(); | 
				
			||||
 | 
					        EnergyPositionalMocap = MocapBodyStats | 
				
			||||
 | 
					            .Select(x=>x.Velocity.magnitude) | 
				
			||||
 | 
					            .Average(); | 
				
			||||
 | 
					        EnergyPositionalRagDoll = RagDollBodyStats | 
				
			||||
 | 
					            .Select(x=>x.Velocity.magnitude) | 
				
			||||
 | 
					            .Average(); | 
				
			||||
 | 
					        EnergyDifferencePositional = RagDollBodyStats | 
				
			||||
 | 
					            .Zip(MocapBodyStats, (x,y) => x.Velocity.magnitude-y.Velocity.magnitude) | 
				
			||||
 | 
					            .Average(); | 
				
			||||
 | 
					         | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public Transform GetRagDollCOM() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        return _ragDollBodyStats.transform; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public Vector3 GetMocapCOMVelocityInWorldSpace() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var velocity = _mocapBodyStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        var velocityInWorldSpace = _mocapBodyStats.transform.TransformVector(velocity); | 
				
			||||
 | 
					        return velocityInWorldSpace; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void OnDrawGizmos() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (_mocapBodyStats == null) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        // MocapCOMVelocity
 | 
				
			||||
 | 
					        Vector3 pos = new Vector3(transform.position.x, .3f, transform.position.z); | 
				
			||||
 | 
					        Vector3 vector = MocapCOMVelocity; | 
				
			||||
 | 
					        if (VelocityInWorldSpace) | 
				
			||||
 | 
					            vector = _mocapBodyStats.transform.TransformVector(vector); | 
				
			||||
 | 
					        DrawArrow(pos, vector, Color.grey); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // RagDollCOMVelocity;
 | 
				
			||||
 | 
					        vector = RagDollCOMVelocity; | 
				
			||||
 | 
					        if (VelocityInWorldSpace) | 
				
			||||
 | 
					            vector = _ragDollBodyStats.transform.TransformVector(vector); | 
				
			||||
 | 
					        DrawArrow(pos, vector, Color.blue); | 
				
			||||
 | 
					        Vector3 actualPos = pos + vector; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // InputDesiredHorizontalVelocity;
 | 
				
			||||
 | 
					        vector = new Vector3(InputDesiredHorizontalVelocity.x, 0f, InputDesiredHorizontalVelocity.y); | 
				
			||||
 | 
					        if (VelocityInWorldSpace) | 
				
			||||
 | 
					            vector = _ragDollBodyStats.transform.TransformVector(vector); | 
				
			||||
 | 
					        DrawArrow(pos, vector, Color.green); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // HorizontalVelocityDifference;
 | 
				
			||||
 | 
					        vector = new Vector3(HorizontalVelocityDifference.x, 0f, HorizontalVelocityDifference.y); | 
				
			||||
 | 
					        if (VelocityInWorldSpace) | 
				
			||||
 | 
					            vector = _ragDollBodyStats.transform.TransformVector(vector); | 
				
			||||
 | 
					        DrawArrow(actualPos, vector, Color.red); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        for (int i = 0; i < RagDollBodyStats.Count; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var stat = RagDollBodyStats[i]; | 
				
			||||
 | 
					            var differenceStat = BodyPartDifferenceStats[i]; | 
				
			||||
 | 
					            pos = stat.Position; | 
				
			||||
 | 
					            vector = stat.Velocity; | 
				
			||||
 | 
					            if (PositionInWorldSpace) | 
				
			||||
 | 
					                pos = _ragDollBodyStats.transform.TransformPoint(pos); | 
				
			||||
 | 
					            if (VelocityInWorldSpace) | 
				
			||||
 | 
					                vector = _ragDollBodyStats.transform.TransformVector(vector); | 
				
			||||
 | 
					            DrawArrow(pos, vector, Color.cyan); | 
				
			||||
 | 
					            Vector3 velocityPos = pos + vector; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            pos = stat.Position; | 
				
			||||
 | 
					            vector = differenceStat.Position; | 
				
			||||
 | 
					            if (PositionInWorldSpace) | 
				
			||||
 | 
					                pos = _ragDollBodyStats.transform.TransformPoint(pos); | 
				
			||||
 | 
					            if (VelocityInWorldSpace) | 
				
			||||
 | 
					                vector = _ragDollBodyStats.transform.TransformVector(vector); | 
				
			||||
 | 
					            Gizmos.color = Color.magenta; | 
				
			||||
 | 
					            Gizmos.DrawRay(pos, vector); | 
				
			||||
 | 
					            Vector3 differencePos = pos + vector; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            vector = differenceStat.Velocity; | 
				
			||||
 | 
					            if (VelocityInWorldSpace) | 
				
			||||
 | 
					                vector = _ragDollBodyStats.transform.TransformVector(vector); | 
				
			||||
 | 
					            DrawArrow(velocityPos, vector, Color.red); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void DrawArrow(Vector3 start, Vector3 vector, Color color) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        float headSize = 0.25f; | 
				
			||||
 | 
					        float headAngle = 20.0f; | 
				
			||||
 | 
					        Gizmos.color = color; | 
				
			||||
 | 
					        Gizmos.DrawRay(start, vector); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (vector.magnitude > 0f) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Vector3 right = Quaternion.LookRotation(vector) * Quaternion.Euler(0, 180 + headAngle, 0) * new Vector3(0, 0, 1); | 
				
			||||
 | 
					            Vector3 left = Quaternion.LookRotation(vector) * Quaternion.Euler(0, 180 - headAngle, 0) * new Vector3(0, 0, 1); | 
				
			||||
 | 
					            Gizmos.DrawRay(start + vector, right * headSize); | 
				
			||||
 | 
					            Gizmos.DrawRay(start + vector, left * headSize); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 3ee2847361b53424aab5705f58c521d0 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,347 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using Unity.MLAgents; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using ManyWorlds; | 
				
			||||
 | 
					using UnityEngine.Assertions; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class ObservationStats : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    [System.Serializable] | 
				
			||||
 | 
					    public class Stat | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        public string Name; | 
				
			||||
 | 
					        public Vector3 Position; | 
				
			||||
 | 
					        public Quaternion Rotation; | 
				
			||||
 | 
					        public Vector3 Velocity; | 
				
			||||
 | 
					        public Vector3 AngularVelocity; | 
				
			||||
 | 
					        [HideInInspector] | 
				
			||||
 | 
					        public Vector3 LastLocalPosition; | 
				
			||||
 | 
					        [HideInInspector] | 
				
			||||
 | 
					        public Quaternion LastLocalRotation; | 
				
			||||
 | 
					        [HideInInspector] | 
				
			||||
 | 
					        public bool LastIsSet; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public MonoBehaviour ObjectToTrack; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Anchor stats")] | 
				
			||||
 | 
					    public Vector3 HorizontalDirection; // Normalized vector in direction of travel (assume right angle to floor)
 | 
				
			||||
 | 
					    // public Vector3 CenterOfMassInWorldSpace; 
 | 
				
			||||
 | 
					    public Vector3 AngualrVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Stats, relative to HorizontalDirection & Center Of Mass")] | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocity; | 
				
			||||
 | 
					    public Vector3 CenterOfMassHorizontalVelocity; | 
				
			||||
 | 
					    public float CenterOfMassVelocityMagnitude; | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocityInRootSpace; | 
				
			||||
 | 
					    public float CenterOfMassVelocityMagnitudeInRootSpace; | 
				
			||||
 | 
					    public float CenterOfMassHorizontalVelocityMagnitude; | 
				
			||||
 | 
					    public Vector3 DesiredCenterOfMassVelocity; | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocityDifference; | 
				
			||||
 | 
					    public List<Stat> Stats; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // [Header("... for debugging")]
 | 
				
			||||
 | 
					    [Header("Gizmos")] | 
				
			||||
 | 
					    public bool VelocityInWorldSpace = true; | 
				
			||||
 | 
					    public bool HorizontalVelocity = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    public Vector3 LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    public Quaternion LastRotation; | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    public bool LastIsSet; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    SpawnableEnv _spawnableEnv; | 
				
			||||
 | 
					    List<Collider> _bodyParts; | 
				
			||||
 | 
					    internal List<Rigidbody> _rigidbodyParts; | 
				
			||||
 | 
					    internal List<ArticulationBody> _articulationBodyParts; | 
				
			||||
 | 
					    GameObject _root; | 
				
			||||
 | 
					    IAnimationController _animationController; | 
				
			||||
 | 
					    bool _hasLazyInitialized; | 
				
			||||
 | 
					    MapAnim2Ragdoll _mapAnim2Ragdoll; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    string rootName = "articulation:Hips"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void setRootName(string s) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        rootName = s; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnAgentInitialize(Transform defaultTransform) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsFalse(_hasLazyInitialized); | 
				
			||||
 | 
					        _hasLazyInitialized = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mapAnim2Ragdoll = defaultTransform.GetComponent<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					        _spawnableEnv = GetComponentInParent<SpawnableEnv>(); | 
				
			||||
 | 
					        _animationController = _spawnableEnv.GetComponentInChildren<IAnimationController>(); | 
				
			||||
 | 
					        _rigidbodyParts = ObjectToTrack.GetComponentsInChildren<Rigidbody>().ToList(); | 
				
			||||
 | 
					        _articulationBodyParts = ObjectToTrack.GetComponentsInChildren<ArticulationBody>().ToList(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (_rigidbodyParts?.Count > 0) | 
				
			||||
 | 
					            _bodyParts = _rigidbodyParts | 
				
			||||
 | 
					                .SelectMany(x=>x.GetComponentsInChildren<Collider>()) | 
				
			||||
 | 
					                .Distinct() | 
				
			||||
 | 
					                .ToList(); | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					            _bodyParts = _articulationBodyParts | 
				
			||||
 | 
					                .SelectMany(x=>x.GetComponentsInChildren<Collider>()) | 
				
			||||
 | 
					                .Distinct() | 
				
			||||
 | 
					                .ToList(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _bodyParts  =   _bodyParts | 
				
			||||
 | 
					            .Where(x => x.enabled) | 
				
			||||
 | 
					            .Where(x => !x.isTrigger) | 
				
			||||
 | 
					            .Where(x=> { | 
				
			||||
 | 
					                var ignoreCollider = x.GetComponent<IgnoreColliderForObservation>(); | 
				
			||||
 | 
					                if (ignoreCollider == null) | 
				
			||||
 | 
					                    return true; | 
				
			||||
 | 
					                return !ignoreCollider.enabled;}) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					       | 
				
			||||
 | 
					        Stats = _bodyParts | 
				
			||||
 | 
					            .Select(x => new Stat { Name = x.name }) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //TODO: this is quite sketchy, we should have a better way to deal with this
 | 
				
			||||
 | 
					        if (_root == null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					           // Debug.Log("in game object: " + name + " my rootname is: " + rootName);
 | 
				
			||||
 | 
					            if (_rigidbodyParts?.Count > 0) | 
				
			||||
 | 
					                _root = _rigidbodyParts.First(x => x.name == rootName).gameObject; | 
				
			||||
 | 
					            else | 
				
			||||
 | 
					                _root = _articulationBodyParts.First(x => x.name == rootName).gameObject; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        transform.position = defaultTransform.position; | 
				
			||||
 | 
					        transform.rotation = defaultTransform.rotation; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasLazyInitialized); | 
				
			||||
 | 
					        ResetStatus(); | 
				
			||||
 | 
					        LastIsSet = false; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void ResetStatus() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        LastIsSet = false; | 
				
			||||
 | 
					        var timeDelta = float.MinValue; | 
				
			||||
 | 
					        SetStatusForStep(timeDelta); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Return rotation from one rotation to another
 | 
				
			||||
 | 
					    public static Quaternion FromToRotation(Quaternion from, Quaternion to) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (to == from) return Quaternion.identity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return to * Quaternion.Inverse(from); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Adjust the value of an angle to lie within [-pi, +pi].
 | 
				
			||||
 | 
					    public static float NormalizedAngle(float angle) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (angle < 180) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            return angle * Mathf.Deg2Rad; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        return (angle - 360) * Mathf.Deg2Rad; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Calculate rotation between two rotations in radians. Adjusts the value to lie within [-pi, +pi].
 | 
				
			||||
 | 
					    public static Vector3 NormalizedEulerAngles(Vector3 eulerAngles) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var x = NormalizedAngle(eulerAngles.x); | 
				
			||||
 | 
					        var y = NormalizedAngle(eulerAngles.y); | 
				
			||||
 | 
					        var z = NormalizedAngle(eulerAngles.z); | 
				
			||||
 | 
					        return new Vector3(x, y, z); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Find angular velocity. The delta rotation is converted to radians within [-pi, +pi].
 | 
				
			||||
 | 
					    public static Vector3 GetAngularVelocity(Quaternion from, Quaternion to, float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var rotationVelocity = FromToRotation(from, to); | 
				
			||||
 | 
					        var angularVelocity = NormalizedEulerAngles(rotationVelocity.eulerAngles) / timeDelta; | 
				
			||||
 | 
					        return angularVelocity; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void SetStatusForStep(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // get Center Of Mass velocity in f space
 | 
				
			||||
 | 
					        Vector3 newCOM; | 
				
			||||
 | 
					        // if Moocap, then get from anim2Ragdoll
 | 
				
			||||
 | 
					        if (_mapAnim2Ragdoll != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            newCOM = _mapAnim2Ragdoll.LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					            var newHorizontalDirection = _mapAnim2Ragdoll.HorizontalDirection; | 
				
			||||
 | 
					            HorizontalDirection = newHorizontalDirection / 180f; | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            transform.position = newCOM; | 
				
			||||
 | 
					            transform.rotation = Quaternion.Euler(newHorizontalDirection); | 
				
			||||
 | 
					            CenterOfMassVelocity = _mapAnim2Ragdoll.CenterOfMassVelocity; | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitude = _mapAnim2Ragdoll.CenterOfMassVelocityMagnitude; | 
				
			||||
 | 
					            CenterOfMassVelocityInRootSpace = transform.InverseTransformVector(CenterOfMassVelocity); | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitudeInRootSpace = CenterOfMassVelocityInRootSpace.magnitude; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            newCOM = GetCenterOfMass(); | 
				
			||||
 | 
					            var newHorizontalDirection = new Vector3(0f, _root.transform.eulerAngles.y, 0f); | 
				
			||||
 | 
					            HorizontalDirection = newHorizontalDirection / 180f; | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            transform.position = newCOM; | 
				
			||||
 | 
					            transform.rotation = Quaternion.Euler(newHorizontalDirection); | 
				
			||||
 | 
					            var velocity = newCOM - LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					            velocity /= timeDelta; | 
				
			||||
 | 
					            CenterOfMassVelocity = velocity; | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitude = CenterOfMassVelocity.magnitude; | 
				
			||||
 | 
					            CenterOfMassVelocityInRootSpace = transform.InverseTransformVector(CenterOfMassVelocity); | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitudeInRootSpace = CenterOfMassVelocityInRootSpace.magnitude; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // get Center Of Mass horizontal velocity in f space
 | 
				
			||||
 | 
					        var comHorizontalDirection = new Vector3(CenterOfMassVelocity.x, 0f, CenterOfMassVelocity.z); | 
				
			||||
 | 
					        CenterOfMassHorizontalVelocity = transform.InverseTransformVector(comHorizontalDirection); | 
				
			||||
 | 
					        CenterOfMassHorizontalVelocityMagnitude = CenterOfMassHorizontalVelocity.magnitude; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // get Desired Center Of Mass horizontal velocity in f space
 | 
				
			||||
 | 
					        Vector3 desiredCom = _animationController.GetDesiredVelocity(); | 
				
			||||
 | 
					        DesiredCenterOfMassVelocity = transform.InverseTransformVector(desiredCom); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // get Desired Center Of Mass horizontal velocity in f space
 | 
				
			||||
 | 
					        CenterOfMassVelocityDifference = DesiredCenterOfMassVelocity - CenterOfMassHorizontalVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!LastIsSet) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            LastRotation = transform.rotation; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        AngualrVelocity = GetAngularVelocity(LastRotation, transform.rotation, timeDelta); | 
				
			||||
 | 
					        LastRotation = transform.rotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // get bodyParts stats in local space
 | 
				
			||||
 | 
					        foreach (var bodyPart in _bodyParts) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Stat bodyPartStat = Stats.First(x => x.Name == bodyPart.name); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Vector3 c = Vector3.zero; | 
				
			||||
 | 
					            CapsuleCollider capsule = bodyPart as CapsuleCollider; | 
				
			||||
 | 
					            BoxCollider box = bodyPart as BoxCollider; | 
				
			||||
 | 
					            SphereCollider sphere = bodyPart as SphereCollider; | 
				
			||||
 | 
					            if (capsule != null) | 
				
			||||
 | 
					                c = capsule.center; | 
				
			||||
 | 
					            else if (box != null) | 
				
			||||
 | 
					                c = box.center; | 
				
			||||
 | 
					            else if (sphere != null) | 
				
			||||
 | 
					                c = sphere.center; | 
				
			||||
 | 
					            Vector3 worldPosition = bodyPart.transform.TransformPoint(c); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Quaternion worldRotation = bodyPart.transform.rotation; | 
				
			||||
 | 
					            Vector3 localPosition = transform.InverseTransformPoint(worldPosition); | 
				
			||||
 | 
					            Quaternion localRotation = FromToRotation(transform.rotation, worldRotation); | 
				
			||||
 | 
					            if (!bodyPartStat.LastIsSet || !LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                bodyPartStat.LastLocalPosition = localPosition; | 
				
			||||
 | 
					                bodyPartStat.LastLocalRotation = localRotation; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            bodyPartStat.Position = localPosition; | 
				
			||||
 | 
					            bodyPartStat.Rotation = localRotation; | 
				
			||||
 | 
					            bodyPartStat.Velocity = (localPosition - bodyPartStat.LastLocalPosition) / timeDelta; | 
				
			||||
 | 
					            bodyPartStat.AngularVelocity = GetAngularVelocity(bodyPartStat.LastLocalRotation, localRotation, timeDelta); | 
				
			||||
 | 
					            bodyPartStat.LastLocalPosition = localPosition; | 
				
			||||
 | 
					            bodyPartStat.LastLocalRotation = localRotation; | 
				
			||||
 | 
					            bodyPartStat.LastIsSet = true; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        LastIsSet = true; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    Vector3 GetCenterOfMass() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var centerOfMass = Vector3.zero; | 
				
			||||
 | 
					        float totalMass = 0f; | 
				
			||||
 | 
					        foreach (ArticulationBody ab in _articulationBodyParts) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            centerOfMass += ab.worldCenterOfMass * ab.mass; | 
				
			||||
 | 
					            totalMass += ab.mass; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        centerOfMass /= totalMass; | 
				
			||||
 | 
					        // centerOfMass -= _spawnableEnv.transform.position;
 | 
				
			||||
 | 
					        return centerOfMass; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void OnDrawGizmosSelected() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (_bodyParts == null || _bodyParts.Count ==0) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        // draw arrow for desired input velocity
 | 
				
			||||
 | 
					        // Vector3 pos = new Vector3(transform.position.x, transform.position.y, transform.position.z);
 | 
				
			||||
 | 
					        Vector3 pos = new Vector3(transform.position.x, .3f, transform.position.z); | 
				
			||||
 | 
					        Vector3 vector = DesiredCenterOfMassVelocity; | 
				
			||||
 | 
					        if (VelocityInWorldSpace) | 
				
			||||
 | 
					            vector = transform.TransformVector(vector); | 
				
			||||
 | 
					        DrawArrow(pos, vector, Color.green); | 
				
			||||
 | 
					        Vector3 desiredInputPos = pos + vector; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (HorizontalVelocity) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // arrow for actual velocity
 | 
				
			||||
 | 
					            vector = CenterOfMassHorizontalVelocity; | 
				
			||||
 | 
					            if (VelocityInWorldSpace) | 
				
			||||
 | 
					                vector = transform.TransformVector(vector); | 
				
			||||
 | 
					            DrawArrow(pos, vector, Color.blue); | 
				
			||||
 | 
					            Vector3 actualPos = pos + vector; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // arrow for actual velocity difference
 | 
				
			||||
 | 
					            vector = CenterOfMassVelocityDifference; | 
				
			||||
 | 
					            if (VelocityInWorldSpace) | 
				
			||||
 | 
					                vector = transform.TransformVector(vector); | 
				
			||||
 | 
					            DrawArrow(actualPos, vector, Color.red); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            vector = CenterOfMassVelocity; | 
				
			||||
 | 
					            if (VelocityInWorldSpace) | 
				
			||||
 | 
					                vector = transform.TransformVector(vector); | 
				
			||||
 | 
					            DrawArrow(pos, vector, Color.blue); | 
				
			||||
 | 
					            Vector3 actualPos = pos + vector; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // arrow for actual velocity difference
 | 
				
			||||
 | 
					            vector = DesiredCenterOfMassVelocity - CenterOfMassVelocity; | 
				
			||||
 | 
					            if (VelocityInWorldSpace) | 
				
			||||
 | 
					                vector = transform.TransformVector(vector); | 
				
			||||
 | 
					            DrawArrow(actualPos, vector, Color.red); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void DrawArrow(Vector3 start, Vector3 vector, Color color) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        float headSize = 0.25f; | 
				
			||||
 | 
					        float headAngle = 20.0f; | 
				
			||||
 | 
					        Gizmos.color = color; | 
				
			||||
 | 
					        Gizmos.DrawRay(start, vector); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (vector.magnitude > 0f) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Vector3 right = Quaternion.LookRotation(vector) * Quaternion.Euler(0, 180 + headAngle, 0) * new Vector3(0, 0, 1); | 
				
			||||
 | 
					            Vector3 left = Quaternion.LookRotation(vector) * Quaternion.Euler(0, 180 - headAngle, 0) * new Vector3(0, 0, 1); | 
				
			||||
 | 
					            Gizmos.DrawRay(start + vector, right * headSize); | 
				
			||||
 | 
					            Gizmos.DrawRay(start + vector, left * headSize); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 87e306564e6a646399aa6640e5e7447c | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,566 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using Unity.MLAgents; | 
				
			||||
 | 
					using Unity.MLAgents.Actuators; | 
				
			||||
 | 
					using Unity.MLAgents.Sensors; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using ManyWorlds; | 
				
			||||
 | 
					using UnityEngine.Assertions; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					using System; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class ProcRagdollAgent : Agent | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    [Header("Settings")] | 
				
			||||
 | 
					    public float FixedDeltaTime = 1f / 60f; | 
				
			||||
 | 
					    public float ActionSmoothingBeta = 0.2f; | 
				
			||||
 | 
					    public bool ReproduceDReCon = true; | 
				
			||||
 | 
					    | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Camera")] | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public bool RequestCamera; | 
				
			||||
 | 
					    public bool CameraFollowMe; | 
				
			||||
 | 
					    public Transform CameraTarget; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("... debug")] | 
				
			||||
 | 
					    public bool SkipActionSmoothing; | 
				
			||||
 | 
					    public bool debugCopyMocap; | 
				
			||||
 | 
					    public bool ignorActions; | 
				
			||||
 | 
					    public bool dontResetOnZeroReward; | 
				
			||||
 | 
					    public bool dontSnapMocapToRagdoll = true; | 
				
			||||
 | 
					    public bool DebugPauseOnReset; | 
				
			||||
 | 
					    public bool dontResetWhenOutOfBounds; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //List<Rigidbody> _mocapBodyParts;
 | 
				
			||||
 | 
					    SpawnableEnv _spawnableEnv; | 
				
			||||
 | 
					    Observations2Learn _observations2Learn; | 
				
			||||
 | 
					    Rewards2Learn _rewards2Learn; | 
				
			||||
 | 
					    Muscles _ragDollMuscles; | 
				
			||||
 | 
					    List<ArticulationBody> _motors; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					  | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    MarathonTestBedController _debugController; | 
				
			||||
 | 
					    InputController _inputController; | 
				
			||||
 | 
					    SensorObservations _sensorObservations; | 
				
			||||
 | 
					    DecisionRequester _decisionRequester; | 
				
			||||
 | 
					    IAnimationController _controllerToMimic; | 
				
			||||
 | 
					  | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    bool _hasLazyInitialized; | 
				
			||||
 | 
					    //float[] _smoothedActions;
 | 
				
			||||
 | 
					    float[] _mocapTargets; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Space(16)] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    bool _hasAwake = false; | 
				
			||||
 | 
					    MapAnim2Ragdoll _mapAnim2Ragdoll; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    float observationTimeDelta; | 
				
			||||
 | 
					    float actionTimeDelta; | 
				
			||||
 | 
					    void Awake() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (RequestCamera && CameraTarget != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // Will follow the last object to be spawned
 | 
				
			||||
 | 
					            var camera = FindObjectOfType<Camera>(); | 
				
			||||
 | 
					            if (camera != null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                var follow = camera.GetComponent<SmoothFollow>(); | 
				
			||||
 | 
					                if (follow != null) | 
				
			||||
 | 
					                    follow.target = CameraTarget; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _hasAwake = true; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void Update() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (debugCopyMocap) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            EndEpisode(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Assert.IsTrue(_hasLazyInitialized); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // hadle mocap going out of bounds
 | 
				
			||||
 | 
					        bool isOutOfBounds = !_spawnableEnv.IsPointWithinBoundsInWorldSpace(_mapAnim2Ragdoll.transform.position+new Vector3(0f, .1f, 0f)); | 
				
			||||
 | 
					        bool reset = isOutOfBounds && dontResetWhenOutOfBounds == false; | 
				
			||||
 | 
					        if (reset) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _mapAnim2Ragdoll.transform.position = _spawnableEnv.transform.position; | 
				
			||||
 | 
					            EndEpisode(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    override public void CollectObservations(VectorSensor sensor) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasLazyInitialized); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        observationTimeDelta = Time.fixedDeltaTime * _decisionRequester.DecisionPeriod; | 
				
			||||
 | 
					        _mapAnim2Ragdoll.OnStep(observationTimeDelta); | 
				
			||||
 | 
					        _observations2Learn.OnStep(observationTimeDelta); | 
				
			||||
 | 
					       | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (ReproduceDReCon) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            AddDReConObservations(sensor); | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.MocapCOMVelocity); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.RagDollCOMVelocity); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.RagDollCOMVelocity - _observations2Learn.MocapCOMVelocity); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.InputDesiredHorizontalVelocity); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.InputJump); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.InputBackflip); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.HorizontalVelocityDifference); | 
				
			||||
 | 
					        // foreach (var stat in _dReConObservations.MocapBodyStats)
 | 
				
			||||
 | 
					        // {
 | 
				
			||||
 | 
					        //     sensor.AddObservation(stat.Position);
 | 
				
			||||
 | 
					        //     sensor.AddObservation(stat.Velocity);
 | 
				
			||||
 | 
					        // }
 | 
				
			||||
 | 
					        foreach (var stat in _observations2Learn.RagDollBodyStats) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            sensor.AddObservation(stat.Position); | 
				
			||||
 | 
					            sensor.AddObservation(stat.Velocity); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        foreach (var stat in _observations2Learn.BodyPartDifferenceStats) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            sensor.AddObservation(stat.Position); | 
				
			||||
 | 
					            sensor.AddObservation(stat.Velocity); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.PreviousActions); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // add sensors (feet etc)
 | 
				
			||||
 | 
					        sensor.AddObservation(_sensorObservations.SensorIsInTouch); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void AddDReConObservations(VectorSensor sensor) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.MocapCOMVelocity); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.RagDollCOMVelocity); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.RagDollCOMVelocity - _observations2Learn.MocapCOMVelocity); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.InputDesiredHorizontalVelocity); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.InputJump); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.InputBackflip); | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.HorizontalVelocityDifference); | 
				
			||||
 | 
					        // foreach (var stat in _dReConObservations.MocapBodyStats)
 | 
				
			||||
 | 
					        // {
 | 
				
			||||
 | 
					        //     sensor.AddObservation(stat.Position);
 | 
				
			||||
 | 
					        //     sensor.AddObservation(stat.Velocity);
 | 
				
			||||
 | 
					        // }
 | 
				
			||||
 | 
					        foreach (var stat in _observations2Learn.RagDollBodyStats) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            sensor.AddObservation(stat.Position); | 
				
			||||
 | 
					            sensor.AddObservation(stat.Velocity); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        foreach (var stat in _observations2Learn.BodyPartDifferenceStats) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            sensor.AddObservation(stat.Position); | 
				
			||||
 | 
					            sensor.AddObservation(stat.Velocity); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        sensor.AddObservation(_observations2Learn.PreviousActions); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //adapted from previous function (Collect Observations)
 | 
				
			||||
 | 
					    public int calculateDreConObservationsize() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        int size = 0; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        size += | 
				
			||||
 | 
					        3  //sensor.AddObservation(_dReConObservations.MocapCOMVelocity);
 | 
				
			||||
 | 
					        + 3 //sensor.AddObservation(_dReConObservations.RagDollCOMVelocity);
 | 
				
			||||
 | 
					        + 3 //sensor.AddObservation(_dReConObservations.RagDollCOMVelocity - _dReConObservations.MocapCOMVelocity);
 | 
				
			||||
 | 
					        + 2 //sensor.AddObservation(_dReConObservations.InputDesiredHorizontalVelocity);
 | 
				
			||||
 | 
					        + 1 //sensor.AddObservation(_dReConObservations.InputJump);
 | 
				
			||||
 | 
					        + 1 //sensor.AddObservation(_dReConObservations.InputBackflip);
 | 
				
			||||
 | 
					        + 2;//sensor.AddObservation(_dReConObservations.HorizontalVelocityDifference);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Observations2Learn _checkDrecon = GetComponent<Observations2Learn>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //foreach (var stat in _dReConObservations.RagDollBodyStats)
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (var collider in _checkDrecon.EstimateBodyPartsForObservation()) | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            size += | 
				
			||||
 | 
					             3 //sensor.AddObservation(stat.Position);
 | 
				
			||||
 | 
					             + 3; //sensor.AddObservation(stat.Velocity);
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        //foreach (var stat in _dReConObservations.BodyPartDifferenceStats)
 | 
				
			||||
 | 
					        foreach (var collider in _checkDrecon.EstimateBodyPartsForObservation()) | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            size += | 
				
			||||
 | 
					            +3 // sensor.AddObservation(stat.Position);
 | 
				
			||||
 | 
					            + 3; // sensor.AddObservation(stat.Velocity);
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //action size and sensor size are calculated separately, we do not use:
 | 
				
			||||
 | 
					        //sensor.AddObservation(_dReConObservations.PreviousActions);
 | 
				
			||||
 | 
					        //sensor.AddObservation(_sensorObservations.SensorIsInTouch);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return size; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public override void OnActionReceived(ActionBuffers actionBuffers) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasLazyInitialized); | 
				
			||||
 | 
					        float[] vectorAction = actionBuffers.ContinuousActions.Select(x=>x).ToArray(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        actionTimeDelta = Time.fixedDeltaTime; | 
				
			||||
 | 
					        if (!_decisionRequester.TakeActionsBetweenDecisions) | 
				
			||||
 | 
					            actionTimeDelta = actionTimeDelta*_decisionRequester.DecisionPeriod; | 
				
			||||
 | 
					        _mapAnim2Ragdoll.OnStep(actionTimeDelta); | 
				
			||||
 | 
					        _rewards2Learn.OnStep(actionTimeDelta); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        bool shouldDebug = _debugController != null; | 
				
			||||
 | 
					        bool dontUpdateMotor = false; | 
				
			||||
 | 
					        if (_debugController != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            dontUpdateMotor = _debugController.DontUpdateMotor; | 
				
			||||
 | 
					            dontUpdateMotor &= _debugController.isActiveAndEnabled; | 
				
			||||
 | 
					            dontUpdateMotor &= _debugController.gameObject.activeInHierarchy; | 
				
			||||
 | 
					            shouldDebug &= _debugController.isActiveAndEnabled; | 
				
			||||
 | 
					            shouldDebug &= _debugController.gameObject.activeInHierarchy; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        if (shouldDebug) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            vectorAction = GetDebugActions(vectorAction); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!SkipActionSmoothing) | 
				
			||||
 | 
					            vectorAction = SmoothActions(vectorAction); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        int i = 0;//keeps track of hte number of actions
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        int j = 0;//keeps track of the number of motoros
 | 
				
			||||
 | 
					        foreach (var m in _motors) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (m.isRoot) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            if (dontUpdateMotor) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            Vector3 targetNormalizedRotation = Vector3.zero; | 
				
			||||
 | 
								if (m.jointType != ArticulationJointType.SphericalJoint) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            if (m.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                targetNormalizedRotation.x = vectorAction[i++]; | 
				
			||||
 | 
					            if (m.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                targetNormalizedRotation.y = vectorAction[i++]; | 
				
			||||
 | 
					            if (m.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                targetNormalizedRotation.z = vectorAction[i++]; | 
				
			||||
 | 
					            if (!ignorActions) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					              | 
				
			||||
 | 
					                _ragDollMuscles.UpdateMotor(m, targetNormalizedRotation, actionTimeDelta); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					          | 
				
			||||
 | 
					            j++; | 
				
			||||
 | 
					          | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _observations2Learn.PreviousActions = vectorAction; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        AddReward(_rewards2Learn.Reward); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (ReproduceDReCon) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // DReCon Logic
 | 
				
			||||
 | 
					            if (_rewards2Learn.HeadHeightDistance > 1f || _rewards2Learn.Reward <= 0f) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                if (!dontResetOnZeroReward) | 
				
			||||
 | 
					                    EndEpisode(); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else if (_rewards2Learn.Reward <= 0.1f && !dontSnapMocapToRagdoll) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                Transform ragDollCom = _observations2Learn.GetRagDollCOM(); | 
				
			||||
 | 
					                Vector3 snapPosition = ragDollCom.position; | 
				
			||||
 | 
					                // snapPosition.y = 0f;
 | 
				
			||||
 | 
					                var snapDistance = _mapAnim2Ragdoll.SnapTo(snapPosition); | 
				
			||||
 | 
					                // AddReward(-.5f);
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // Our Logic
 | 
				
			||||
 | 
					            bool terminate = false; | 
				
			||||
 | 
					            terminate = terminate || _rewards2Learn.PositionReward < 1E-5f; | 
				
			||||
 | 
					            if (StepCount > 4)  // HACK
 | 
				
			||||
 | 
					                terminate = terminate || _rewards2Learn.ComVelocityReward < 1E-50f; | 
				
			||||
 | 
					            // terminate = terminate || _dReConRewards.ComDirectionReward < .01f;
 | 
				
			||||
 | 
					            if (_rewards2Learn.VelDifferenceReward > 0f && StepCount > 4) // HACK
 | 
				
			||||
 | 
					                terminate = terminate || _rewards2Learn.VelDifferenceReward < 1E-10f; | 
				
			||||
 | 
					            terminate = terminate || _rewards2Learn.LocalPoseReward < 1E-5f; | 
				
			||||
 | 
					            // terminate = terminate || _dReConRewards.PositionReward < .01f;
 | 
				
			||||
 | 
					            // // terminate = terminate || _dReConRewards.ComVelocityReward < .01f;
 | 
				
			||||
 | 
					            // terminate = terminate || _dReConRewards.ComDirectionReward < .01f;
 | 
				
			||||
 | 
					            // if (_dReConRewards.VelDifferenceReward > 0f) // HACK
 | 
				
			||||
 | 
					            //     terminate = terminate || _dReConRewards.VelDifferenceReward < .01f;
 | 
				
			||||
 | 
					            // terminate = terminate || _dReConRewards.LocalPoseReward < .01f;
 | 
				
			||||
 | 
					            if (dontResetOnZeroReward) | 
				
			||||
 | 
					                terminate = false; | 
				
			||||
 | 
					            if (terminate) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                EndEpisode(); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else if (!dontSnapMocapToRagdoll) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                Transform ragDollCom = _observations2Learn.GetRagDollCOM(); | 
				
			||||
 | 
					                Vector3 snapPosition = ragDollCom.position; | 
				
			||||
 | 
					                // snapPosition.y = 0f;
 | 
				
			||||
 | 
					                var snapDistance = _mapAnim2Ragdoll.SnapTo(snapPosition); | 
				
			||||
 | 
					                // AddReward(-.5f);
 | 
				
			||||
 | 
					            }             | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    float[] GetDebugActions(float[] vectorAction) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var debugActions = new List<float>(); | 
				
			||||
 | 
					        foreach (var m in _motors) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (m.isRoot) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            DebugMotor debugMotor = m.GetComponent<DebugMotor>(); | 
				
			||||
 | 
					            if (debugMotor == null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                debugMotor = m.gameObject.AddComponent<DebugMotor>(); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            // clip to -1/+1
 | 
				
			||||
 | 
					            debugMotor.Actions = new Vector3( | 
				
			||||
 | 
					                Mathf.Clamp(debugMotor.Actions.x, -1f, 1f), | 
				
			||||
 | 
					                Mathf.Clamp(debugMotor.Actions.y, -1f, 1f), | 
				
			||||
 | 
					                Mathf.Clamp(debugMotor.Actions.z, -1f, 1f) | 
				
			||||
 | 
					            ); | 
				
			||||
 | 
					            Vector3 targetNormalizedRotation = debugMotor.Actions; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
								if (m.jointType != ArticulationJointType.SphericalJoint) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            if (m.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                debugActions.Add(targetNormalizedRotation.x); | 
				
			||||
 | 
					            if (m.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                debugActions.Add(targetNormalizedRotation.y); | 
				
			||||
 | 
					            if (m.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					                debugActions.Add(targetNormalizedRotation.z); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        debugActions = debugActions.Select(x => Mathf.Clamp(x, -1f, 1f)).ToList(); | 
				
			||||
 | 
					        if (_debugController.ApplyRandomActions) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            debugActions = debugActions | 
				
			||||
 | 
					                .Select(x => UnityEngine.Random.Range(-_debugController.RandomRange, _debugController.RandomRange)) | 
				
			||||
 | 
					                .ToList(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _debugController.Actions = debugActions.ToArray(); | 
				
			||||
 | 
					        return debugActions.ToArray(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    float[] SmoothActions(float[] vectorAction) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // yt =β at +(1−β)yt−1
 | 
				
			||||
 | 
					        var smoothedActions = vectorAction | 
				
			||||
 | 
					            .Zip(_observations2Learn.PreviousActions, (a, y) => ActionSmoothingBeta * a + (1f - ActionSmoothingBeta) * y) | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					        return smoothedActions; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    float[] GetActionsFromRagdollState() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var vectorActions = new List<float>(); | 
				
			||||
 | 
					        foreach (var m in _motors) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (m.isRoot) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            int i = 0; | 
				
			||||
 | 
								if (m.jointType != ArticulationJointType.SphericalJoint) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            if (m.twistLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                var drive = m.xDrive; | 
				
			||||
 | 
					                var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					                var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					                var deg = m.jointPosition[i++] * Mathf.Rad2Deg; | 
				
			||||
 | 
					                var target = (deg - midpoint) / scale; | 
				
			||||
 | 
					                vectorActions.Add(target); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            if (m.swingYLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                var drive = m.yDrive; | 
				
			||||
 | 
					                var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					                var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					                var deg = m.jointPosition[i++] * Mathf.Rad2Deg; | 
				
			||||
 | 
					                var target = (deg - midpoint) / scale; | 
				
			||||
 | 
					                vectorActions.Add(target); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            if (m.swingZLock == ArticulationDofLock.LimitedMotion) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                var drive = m.zDrive; | 
				
			||||
 | 
					                var scale = (drive.upperLimit - drive.lowerLimit) / 2f; | 
				
			||||
 | 
					                var midpoint = drive.lowerLimit + scale; | 
				
			||||
 | 
					                var deg = m.jointPosition[i++] * Mathf.Rad2Deg; | 
				
			||||
 | 
					                var target = (deg - midpoint) / scale; | 
				
			||||
 | 
					                vectorActions.Add(target); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        return vectorActions.ToArray(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public override void Initialize() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasAwake); | 
				
			||||
 | 
					        Assert.IsFalse(_hasLazyInitialized); | 
				
			||||
 | 
					        _hasLazyInitialized = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _decisionRequester = GetComponent<DecisionRequester>(); | 
				
			||||
 | 
					        _debugController = FindObjectOfType<MarathonTestBedController>(); | 
				
			||||
 | 
					        Time.fixedDeltaTime = FixedDeltaTime; | 
				
			||||
 | 
					        _spawnableEnv = GetComponentInParent<SpawnableEnv>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (_debugController != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            dontResetOnZeroReward = true; | 
				
			||||
 | 
					            dontSnapMocapToRagdoll = true; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mapAnim2Ragdoll = _spawnableEnv.GetComponentInChildren<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					        //_mocapBodyParts = _mapAnim2Ragdoll.GetRigidBodies();
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _observations2Learn = GetComponent<Observations2Learn>(); | 
				
			||||
 | 
					        _rewards2Learn = GetComponent<Rewards2Learn>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _ragDollMuscles = GetComponent<Muscles>(); | 
				
			||||
 | 
					       | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _inputController = _spawnableEnv.GetComponentInChildren<InputController>(); | 
				
			||||
 | 
					        _sensorObservations = GetComponent<SensorObservations>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _motors = GetComponentsInChildren<ArticulationBody>() | 
				
			||||
 | 
					            .Where(x => x.jointType == ArticulationJointType.SphericalJoint) | 
				
			||||
 | 
					            .Where(x => !x.isRoot) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        //var individualMotors = new List<float>();
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					         | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _observations2Learn.PreviousActions = GetActionsFromRagdollState(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _controllerToMimic = _mapAnim2Ragdoll.GetComponent<IAnimationController>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mapAnim2Ragdoll.OnAgentInitialize(); | 
				
			||||
 | 
					        //it can only be used AFTER _mapAnim2Ragdoll is initialzed.
 | 
				
			||||
 | 
					        _ragDollMuscles.SetKinematicReference(_mapAnim2Ragdoll);//only used in mode PDopenloop
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _observations2Learn.OnAgentInitialize(); | 
				
			||||
 | 
					        _rewards2Learn.OnAgentInitialize(ReproduceDReCon); | 
				
			||||
 | 
					        _controllerToMimic.OnAgentInitialize(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					      | 
				
			||||
 | 
					        _hasLazyInitialized = true; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public override void OnEpisodeBegin() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasAwake); | 
				
			||||
 | 
					        //_smoothedActions = null;
 | 
				
			||||
 | 
					        debugCopyMocap = false; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 resetVelocity = Vector3.zero; | 
				
			||||
 | 
					        if (_inputController != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // _inputController.OnReset();
 | 
				
			||||
 | 
					            _controllerToMimic.OnReset(); | 
				
			||||
 | 
					            // resets to source anim
 | 
				
			||||
 | 
					            // var angle = Vector3.SignedAngle(Vector3.forward, _inputController.HorizontalDirection, Vector3.up);
 | 
				
			||||
 | 
					            // var rotation = Quaternion.Euler(0f, angle, 0f);
 | 
				
			||||
 | 
					            var rotation = _mapAnim2Ragdoll.transform.rotation; | 
				
			||||
 | 
					            _mapAnim2Ragdoll.OnReset(rotation); | 
				
			||||
 | 
					            _mapAnim2Ragdoll.CopyStatesTo(this.gameObject); | 
				
			||||
 | 
					            resetVelocity = _controllerToMimic.GetDesiredVelocity(); | 
				
			||||
 | 
					            _mapAnim2Ragdoll.CopyVelocityTo(this.gameObject, resetVelocity); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _controllerToMimic.OnReset(); | 
				
			||||
 | 
					            // source anim is continious
 | 
				
			||||
 | 
					            var rotation = _mapAnim2Ragdoll.transform.rotation; | 
				
			||||
 | 
					            _mapAnim2Ragdoll.OnReset(rotation); | 
				
			||||
 | 
					            resetVelocity = _controllerToMimic.GetDesiredVelocity(); | 
				
			||||
 | 
					            _mapAnim2Ragdoll.CopyStatesTo(this.gameObject); | 
				
			||||
 | 
					            _mapAnim2Ragdoll.CopyVelocityTo(this.gameObject, resetVelocity); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _observations2Learn.OnReset(); | 
				
			||||
 | 
					        _rewards2Learn.OnReset(); | 
				
			||||
 | 
					        // float timeDelta = float.Epsilon;
 | 
				
			||||
 | 
					        // _dReConObservations.OnStep(timeDelta);
 | 
				
			||||
 | 
					        // _dReConRewards.OnStep(timeDelta);
 | 
				
			||||
 | 
					#if UNITY_EDITOR		
 | 
				
			||||
 | 
							if (DebugPauseOnReset) | 
				
			||||
 | 
							{ | 
				
			||||
 | 
						        UnityEditor.EditorApplication.isPaused = true; | 
				
			||||
 | 
							} | 
				
			||||
 | 
					#endif	        
 | 
				
			||||
 | 
					        if (_debugController != null && _debugController.isActiveAndEnabled) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _debugController.OnAgentEpisodeBegin(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        _observations2Learn.PreviousActions = GetActionsFromRagdollState(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void FixedUpdate() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (debugCopyMocap) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            EndEpisode(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void OnDrawGizmos() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (_rewards2Learn == null || _inputController == null) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        var comTransform = _rewards2Learn._ragDollBodyStats.transform; | 
				
			||||
 | 
					        var vector = new Vector3(_inputController.MovementVector.x, 0f, _inputController.MovementVector.y); | 
				
			||||
 | 
					        var pos = new Vector3(comTransform.position.x, 0.001f, comTransform.position.z); | 
				
			||||
 | 
					        DrawArrow(pos, vector, Color.black); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void DrawArrow(Vector3 start, Vector3 vector, Color color) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        float headSize = 0.25f; | 
				
			||||
 | 
					        float headAngle = 20.0f; | 
				
			||||
 | 
					        Gizmos.color = color; | 
				
			||||
 | 
					        Gizmos.DrawRay(start, vector); | 
				
			||||
 | 
					        if (vector != Vector3.zero) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Vector3 right = Quaternion.LookRotation(vector) * Quaternion.Euler(0, 180 + headAngle, 0) * new Vector3(0, 0, 1); | 
				
			||||
 | 
					            Vector3 left = Quaternion.LookRotation(vector) * Quaternion.Euler(0, 180 - headAngle, 0) * new Vector3(0, 0, 1); | 
				
			||||
 | 
					            Gizmos.DrawRay(start + vector, right * headSize); | 
				
			||||
 | 
					            Gizmos.DrawRay(start + vector, left * headSize); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 80fc21710754c439fb9c67d9e4e30294 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,479 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class ROMparserSwingTwist : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //we assume a decomposition where the twist is in the X axis.
 | 
				
			||||
 | 
					    //This seems consistent with how ArticulationBody works (see constraints in the inspector and definition of ReducedCoordinates)
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public | 
				
			||||
 | 
					    Animator theAnimator; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public | 
				
			||||
 | 
					    Transform skeletonRoot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    Transform[] joints; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    float duration; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    //public ROMinfoCollector info2store;
 | 
				
			||||
 | 
					    public RangeOfMotionValues info2store; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //those are to generate a prefab from a bunch of articulated bodies and the constraints parsed
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //[SerializeField]
 | 
				
			||||
 | 
					    public ArticulationBody targetRagdollRoot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Learning Environment where to integrate the constrained ragdoll. Leave blanc if you do not want to generate any training environment")] | 
				
			||||
 | 
					    public | 
				
			||||
 | 
					    ManyWorlds.SpawnableEnv trainingEnv; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("Leave blanc if you want to apply on all the children of targetRoot")] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    ArticulationBody[] targetJoints; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    string animationEndMessage = "First animation played.If there are no more animations, the constraints have been stored.If there are, wait until the ROM info collector file does not update anymore"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					   | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					//    [SerializeField]
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					 //   public RangeOfMotionValue[] RangeOfMotionPreview;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    MapAnim2Ragdoll _mocapControllerArtanim; | 
				
			||||
 | 
					    Vector3 _rootStartPosition; | 
				
			||||
 | 
					    Quaternion _rootStartRotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public bool MimicMocap; | 
				
			||||
 | 
					    [Range(0, 359)] | 
				
			||||
 | 
					    public int MaxROM = 180; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Range(0, 500)] | 
				
			||||
 | 
					    public int MimicSkipPhysicsSteps = 50; | 
				
			||||
 | 
					    int _physicsStepsToNextMimic = 0; | 
				
			||||
 | 
					    public float stiffness = 40000f; | 
				
			||||
 | 
					    public float damping = 0f; | 
				
			||||
 | 
					    public float forceLimit = float.MaxValue; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Start is called before the first frame update
 | 
				
			||||
 | 
					    void Start() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					      | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        joints = skeletonRoot.GetComponentsInChildren<Transform>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (Transform j in joints) { | 
				
			||||
 | 
					            info2store.addJoint(j); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        try | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            AnimatorClipInfo[] info = theAnimator.GetCurrentAnimatorClipInfo(0); | 
				
			||||
 | 
					            AnimationClip theClip = info[0].clip; | 
				
			||||
 | 
					            duration = theClip.length; | 
				
			||||
 | 
					            Debug.Log("The animation " + theClip.name + " has a duration of: " + duration); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        catch { | 
				
			||||
 | 
					            Debug.Log("the character does not seem to have an animator. Make sure it is moving in some way to extract the Range of Motion"); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocapControllerArtanim = theAnimator.GetComponent<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // get root start position and rotation
 | 
				
			||||
 | 
					        var articulationBodies = targetRagdollRoot.GetComponentsInChildren<ArticulationBody>(true); | 
				
			||||
 | 
					        if (articulationBodies.Length == 0) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        var root = articulationBodies.First(x => x.isRoot); | 
				
			||||
 | 
					        _rootStartPosition = root.transform.position; | 
				
			||||
 | 
					        _rootStartRotation = root.transform.rotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // if no joints specified get joints using
 | 
				
			||||
 | 
					        // not root (is static), begins with 'articulation:'
 | 
				
			||||
 | 
					        if (targetJoints.Length == 0) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            targetJoints = targetRagdollRoot | 
				
			||||
 | 
					                .GetComponentsInChildren<ArticulationBody>(true) | 
				
			||||
 | 
					                .Where(x => x.isRoot == false) | 
				
			||||
 | 
					                .Where(x => x.name.StartsWith("articulation:")) | 
				
			||||
 | 
					                .ToArray(); | 
				
			||||
 | 
					            SetJointsToMaxROM(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void CopyMocap() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (_mocapControllerArtanim != null && | 
				
			||||
 | 
					            targetRagdollRoot != null && | 
				
			||||
 | 
					            _mocapControllerArtanim.enabled) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var atriculationBodies = targetRagdollRoot.GetComponentsInChildren<ArticulationBody>(); | 
				
			||||
 | 
					            if (atriculationBodies.Length == 0) | 
				
			||||
 | 
					                return; | 
				
			||||
 | 
					            var root = atriculationBodies.First(x => x.isRoot); | 
				
			||||
 | 
					            CopyMocapStatesTo(root.gameObject, _rootStartPosition); | 
				
			||||
 | 
					            // teleport back to start position
 | 
				
			||||
 | 
					            // var curRotation = root.transform.rotation;
 | 
				
			||||
 | 
					            // root.TeleportRoot(_rootStartPosition, curRotation);
 | 
				
			||||
 | 
					            // Vector3 offset = _rootStartPosition - root.transform.position;
 | 
				
			||||
 | 
					            // root.gameObject.SetActive(false);
 | 
				
			||||
 | 
					            // foreach (var t in root.GetComponentsInChildren<Transform>())
 | 
				
			||||
 | 
					            // {
 | 
				
			||||
 | 
					            //     t.position = t.position + offset;
 | 
				
			||||
 | 
					            // }
 | 
				
			||||
 | 
					            // root.transform.position = _rootStartPosition;
 | 
				
			||||
 | 
					            // root.gameObject.SetActive(true);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // foreach (var body in atriculationBodies)
 | 
				
			||||
 | 
					            // {
 | 
				
			||||
 | 
					            //     if (body.twistLock == ArticulationDofLock.LimitedMotion)
 | 
				
			||||
 | 
					            //     {
 | 
				
			||||
 | 
					            //         var xDrive = body.xDrive;
 | 
				
			||||
 | 
					            //         List<float> targets = new List<float>();
 | 
				
			||||
 | 
					            //         var bb = body.GetDriveTargets(targets);
 | 
				
			||||
 | 
					            //         var cc = 22;
 | 
				
			||||
 | 
					            //     }
 | 
				
			||||
 | 
					            // }
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void CopyMocapStatesTo(GameObject target, Vector3 rootPosition) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        var targets = target.GetComponentsInChildren<ArticulationBody>().ToList(); | 
				
			||||
 | 
					        if (targets?.Count == 0) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        var root = targets.First(x => x.isRoot); | 
				
			||||
 | 
					        root.gameObject.SetActive(false); | 
				
			||||
 | 
					        var mocapRoot = _mocapControllerArtanim.GetComponentsInChildren<Rigidbody>().First(x => x.name == root.name); | 
				
			||||
 | 
					        Vector3 offset = rootPosition - mocapRoot.transform.position; | 
				
			||||
 | 
					        foreach (var body in targets) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var stat = _mocapControllerArtanim.GetComponentsInChildren<Rigidbody>().First(x => x.name == body.name); | 
				
			||||
 | 
					            body.transform.position = stat.position + offset; | 
				
			||||
 | 
					            body.transform.rotation = stat.rotation; | 
				
			||||
 | 
					            if (body.isRoot) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                body.TeleportRoot(stat.position + offset, stat.rotation); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        root.gameObject.SetActive(true); | 
				
			||||
 | 
					        foreach (var body in targets) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // body.AddForce(new Vector3(0.1f, -200f, 3f));
 | 
				
			||||
 | 
					            // body.AddTorque(new Vector3(0.1f, 200f, 3f));
 | 
				
			||||
 | 
					            body.velocity = (new Vector3(0.1f, 4f, .3f)); | 
				
			||||
 | 
					            body.angularVelocity = (new Vector3(0.1f, 20f, 3f)); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void FixedUpdate() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        for (int i = 0; i < joints.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Quaternion localRotation = joints[i].localRotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					           Vector3 candidates4storage = Utils.GetSwingTwist(localRotation); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					             | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (info2store.Values[i].upper.x < candidates4storage.x) | 
				
			||||
 | 
					                info2store.Values[i].upper.x = candidates4storage.x; | 
				
			||||
 | 
					            if (info2store.Values[i].upper.y < candidates4storage.y) | 
				
			||||
 | 
					                info2store.Values[i].upper.y = candidates4storage.y; | 
				
			||||
 | 
					            if (info2store.Values[i].upper.z < candidates4storage.z) | 
				
			||||
 | 
					                info2store.Values[i].upper.z = candidates4storage.z; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (info2store.Values[i].lower.x > candidates4storage.x) | 
				
			||||
 | 
					                info2store.Values[i].lower.x = candidates4storage.x; | 
				
			||||
 | 
					            if (info2store.Values[i].lower.y > candidates4storage.y) | 
				
			||||
 | 
					                info2store.Values[i].lower.y = candidates4storage.y; | 
				
			||||
 | 
					            if (info2store.Values[i].lower.z > candidates4storage.z) | 
				
			||||
 | 
					                info2store.Values[i].lower.z = candidates4storage.z; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					           | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (duration < Time.time) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if(animationEndMessage.Length > 0) {  | 
				
			||||
 | 
					                Debug.Log(animationEndMessage); | 
				
			||||
 | 
					                animationEndMessage = ""; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					   //     CalcPreview();//this only stores the ROM value?
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        CalculateOscillatorParameters(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    // void FixedUpdate()
 | 
				
			||||
 | 
					    void OnRenderObject() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (MimicMocap) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            if (_physicsStepsToNextMimic-- < 1) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                CopyMocap(); | 
				
			||||
 | 
					                _physicsStepsToNextMimic = MimicSkipPhysicsSteps; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // preview range of motion
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /* | 
				
			||||
 | 
					    void CalcPreview() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        ArticulationBody[] articulationBodies = targetJoints; | 
				
			||||
 | 
					        //we want them all:
 | 
				
			||||
 | 
					        if (articulationBodies.Length == 0) | 
				
			||||
 | 
					            articulationBodies = targetRagdollRoot.GetComponentsInChildren<ArticulationBody>(true); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        List<RangeOfMotionValue> preview = new List<RangeOfMotionValue>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //List<string> jNames = new List<string>(info2store.jointNames);
 | 
				
			||||
 | 
					        List<string> jNames = new List<string>(info2store.getNames()); | 
				
			||||
 | 
					        for (int i = 0; i < articulationBodies.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            string s = articulationBodies[i].name; | 
				
			||||
 | 
					            string[] parts = s.Split(':'); | 
				
			||||
 | 
					            //we assume the articulationBodies have a name structure of hte form ANYNAME:something-in-the-targeted-joint
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            int index = -1; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            index = jNames.FindIndex(x => x.Contains(parts[1])); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (index < 0) | 
				
			||||
 | 
					                    Debug.Log("Could not find a joint name matching " + s + " and specifically: " + parts[1]); | 
				
			||||
 | 
					            else | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                preview.Add(info2store.Values[index]); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					       // RangeOfMotionPreview = preview.ToArray();
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    */ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //Not needed, the previous function already does that
 | 
				
			||||
 | 
					    //public void WriteRangeOfMotion()
 | 
				
			||||
 | 
					    //{
 | 
				
			||||
 | 
					    //    if (RangeOfMotion2Store == null)
 | 
				
			||||
 | 
					    //        RangeOfMotion2Store = RangeOfMotion004.CreateInstance<RangeOfMotion004>();
 | 
				
			||||
 | 
					    //    RangeOfMotion2Store.Values = RangeOfMotionPreview;
 | 
				
			||||
 | 
					    //}
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Make all joints use Max Range of Motion 
 | 
				
			||||
 | 
					    public void SetJointsToMaxROM() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        //these are the articulationBodies that we want to parse and apply the constraints to
 | 
				
			||||
 | 
					        ArticulationBody[] articulationBodies; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ArticulationBody[] joints = targetJoints; | 
				
			||||
 | 
					        //we want them all:
 | 
				
			||||
 | 
					        if (joints.Length == 0) | 
				
			||||
 | 
					            joints = targetRagdollRoot.GetComponentsInChildren<ArticulationBody>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        articulationBodies = joints.ToArray(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (var body in articulationBodies) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            // root has no DOF
 | 
				
			||||
 | 
					            if (body.isRoot) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            body.jointType = ArticulationJointType.SphericalJoint; | 
				
			||||
 | 
					            body.twistLock = ArticulationDofLock.LimitedMotion; | 
				
			||||
 | 
					            body.swingYLock = ArticulationDofLock.LimitedMotion; | 
				
			||||
 | 
					            body.swingZLock = ArticulationDofLock.LimitedMotion; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            var drive = new ArticulationDrive(); | 
				
			||||
 | 
					            drive.lowerLimit = -(float)MaxROM; | 
				
			||||
 | 
					            drive.upperLimit = (float)MaxROM; | 
				
			||||
 | 
					            drive.stiffness = stiffness; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = forceLimit; | 
				
			||||
 | 
					            body.xDrive = drive; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            drive = new ArticulationDrive(); | 
				
			||||
 | 
					            drive.lowerLimit = -(float)MaxROM; | 
				
			||||
 | 
					            drive.upperLimit = (float)MaxROM; | 
				
			||||
 | 
					            drive.stiffness = stiffness; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = forceLimit; | 
				
			||||
 | 
					            body.yDrive = drive; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            drive = new ArticulationDrive(); | 
				
			||||
 | 
					            drive.lowerLimit = -(float)MaxROM; | 
				
			||||
 | 
					            drive.upperLimit = (float)MaxROM; | 
				
			||||
 | 
					            drive.stiffness = stiffness; | 
				
			||||
 | 
					            drive.damping = damping; | 
				
			||||
 | 
					            drive.forceLimit = forceLimit; | 
				
			||||
 | 
					            body.zDrive = drive; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // body.useGravity = false;
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void CalculateOscillatorParameters() {  | 
				
			||||
 | 
					     | 
				
			||||
 | 
					         | 
				
			||||
 | 
					     | 
				
			||||
 | 
					     | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //we assume the constraints have been well applied 
 | 
				
			||||
 | 
					    //This function is called from an Editor Script
 | 
				
			||||
 | 
					    public void Prepare4PrefabStorage(out ProcRagdollAgent rda, out ManyWorlds.SpawnableEnv envPrefab) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ArticulationBody targetRagdollPrefab = GameObject.Instantiate(targetRagdollRoot); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //if there is a spawnableEnv, there is a ragdollAgent:
 | 
				
			||||
 | 
					        rda = targetRagdollPrefab.GetComponent<ProcRagdollAgent>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (rda != null) | 
				
			||||
 | 
					            Debug.Log("Setting up the  ragdoll agent"); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        envPrefab = null; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //these are all the articulationBodies in the ragdoll prefab
 | 
				
			||||
 | 
					        ArticulationBody[] articulationBodies; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Transform[] joints = targetRagdollPrefab.GetComponentsInChildren<Transform>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        List<ArticulationBody> temp = new List<ArticulationBody>(); | 
				
			||||
 | 
					        for (int i = 0; i < joints.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            ArticulationBody a = joints[i].GetComponent<ArticulationBody>(); | 
				
			||||
 | 
					            if (a != null) | 
				
			||||
 | 
					                temp.Add(a); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        articulationBodies = temp.ToArray(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //We also prepare everything inside the ragdoll agent :
 | 
				
			||||
 | 
					        for (int i = 0; i < articulationBodies.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            articulationBodies[i].transform.localRotation = Quaternion.identity; | 
				
			||||
 | 
					            if (articulationBodies[i].isRoot) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                articulationBodies[i].immovable = false; | 
				
			||||
 | 
					                if (rda != null) | 
				
			||||
 | 
					                    rda.CameraTarget = articulationBodies[i].transform; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                if (trainingEnv) | 
				
			||||
 | 
					                { | 
				
			||||
 | 
					                    envPrefab = GameObject.Instantiate(trainingEnv); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    Animator target = envPrefab.transform.GetComponentInChildren<Animator>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    //we assume the environment has an animated character, and in this there is a son which is the root of a bunch of rigidBodies forming a humanoid.
 | 
				
			||||
 | 
					                    //TODO: replace this function with something that creates the rigidBody humanoid such a thing procedurally
 | 
				
			||||
 | 
					                    activateMarathonManTarget(target); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    //we also need our target animation to have this:
 | 
				
			||||
 | 
					                    TrackBodyStatesInWorldSpace tracker = target.GetComponent<TrackBodyStatesInWorldSpace>(); | 
				
			||||
 | 
					                    if (tracker == null) | 
				
			||||
 | 
					                        target.gameObject.AddComponent<TrackBodyStatesInWorldSpace>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    if (rda != null) | 
				
			||||
 | 
					                    { | 
				
			||||
 | 
					                        rda.transform.parent = envPrefab.transform; | 
				
			||||
 | 
					                        rda.name = targetRagdollRoot.name; | 
				
			||||
 | 
					                        rda.enabled = true;//this should already be the case, but just ot be cautious
 | 
				
			||||
 | 
					                    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    MapRagdoll2Anim agentOutcome = envPrefab.GetComponentInChildren<MapRagdoll2Anim>(true); | 
				
			||||
 | 
					                    if (agentOutcome != null) | 
				
			||||
 | 
					                    { | 
				
			||||
 | 
					                        agentOutcome.gameObject.SetActive(true); | 
				
			||||
 | 
					                        //agentOutcome.enabled = true;
 | 
				
			||||
 | 
					                        agentOutcome.ArticulationBodyRoot = articulationBodies[i]; | 
				
			||||
 | 
					                    } | 
				
			||||
 | 
					                } | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    static void activateMarathonManTarget(Animator target) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Transform[] rbs = target.GetComponentsInChildren<Transform>(true); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //Rigidbody[] rbs = target.GetComponentsInChildren<Rigidbody>(true);
 | 
				
			||||
 | 
					        for (int i = 0; i < rbs.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            rbs[i].gameObject.SetActive(true); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //the animation source is a son of the SpawnableEnv, or it does not find the MocapControllerArtanim when it initializes
 | 
				
			||||
 | 
					        MapAnim2Ragdoll mca = target.GetComponent<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					        mca.enabled = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 2ab97429936402d4b8e61f401f945174 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,91 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					using Unity.Barracuda; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					[System.Serializable] | 
				
			||||
 | 
					public class RangeOfMotionValue | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    // [HideInInspector]
 | 
				
			||||
 | 
					    public string name; | 
				
			||||
 | 
					    public Vector3 lower; | 
				
			||||
 | 
					    public Vector3 upper; | 
				
			||||
 | 
					    public Vector3 rangeOfMotion { get { | 
				
			||||
 | 
					        var diff = upper - lower; | 
				
			||||
 | 
					        var rom = new Vector3( | 
				
			||||
 | 
					            Mathf.Abs(diff.x), | 
				
			||||
 | 
					            Mathf.Abs(diff.y), | 
				
			||||
 | 
					            Mathf.Abs(diff.z) | 
				
			||||
 | 
					        ); | 
				
			||||
 | 
					        return rom; | 
				
			||||
 | 
					    }} | 
				
			||||
 | 
					} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class OscillationParameters | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    public string name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public float dampingRatio; | 
				
			||||
 | 
					    public float natFreq; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					[CreateAssetMenu(fileName = "RangeOfMotion", menuName = "Parser/CreateRangeOfMotionFile")] | 
				
			||||
 | 
					public class RangeOfMotionValues : ScriptableObject | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    public RangeOfMotionValue[] Values { get { return _values.ToArray(); } } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //[HideInInspector]
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    List<RangeOfMotionValue> _values = new List<RangeOfMotionValue>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    List<OscillationParameters> _osc = new List<OscillationParameters>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void addJoint(Transform joint) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        RangeOfMotionValue r = new RangeOfMotionValue(); | 
				
			||||
 | 
					        r.name = joint.name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _values.Add(r); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        OscillationParameters o = new OscillationParameters(); | 
				
			||||
 | 
					        o.name = joint.name; | 
				
			||||
 | 
					        _osc.Add(o); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //public
 | 
				
			||||
 | 
					    //a model trained with these constraints
 | 
				
			||||
 | 
					    //NNModel InferenceModel;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public string[] getNames() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        string[] temp = new string[Values.Length]; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        for (int i = 0; i < Values.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            temp[i] = (Values[i].name); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        return temp; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
 | 
					
 | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 2774db094247c4810922f4534abbb6a2 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,385 @@ | 
				
			|||||
 | 
					using System; | 
				
			||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using Unity.MLAgents; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using UnityEngine.Assertions; | 
				
			||||
 | 
					using ManyWorlds; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class RewardStats : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    [Header("Settings")] | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public MonoBehaviour ObjectToTrack; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Stats")] | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocity; | 
				
			||||
 | 
					    public float CenterOfMassVelocityMagnitude; | 
				
			||||
 | 
					    public Vector3 CenterOfMassVelocityInRootSpace; | 
				
			||||
 | 
					    public float CenterOfMassVelocityMagnitudeInRootSpace; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [HideInInspector] public Vector3 LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					    [HideInInspector] public Vector3 HeadPositionInWorldSpace; | 
				
			||||
 | 
					    [HideInInspector] public Vector3 RootPositionInWorldSpace; | 
				
			||||
 | 
					    [HideInInspector] public bool LastIsSet; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    SpawnableEnv _spawnableEnv; | 
				
			||||
 | 
					    List<Collider> _colliders; | 
				
			||||
 | 
					    List<Rigidbody> _rigidbodyParts; | 
				
			||||
 | 
					    List<ArticulationBody> _articulationBodyParts; | 
				
			||||
 | 
					    List<GameObject> _bodyParts; | 
				
			||||
 | 
					    GameObject _root; | 
				
			||||
 | 
					    GameObject _head; | 
				
			||||
 | 
					    MapAnim2Ragdoll _mapAnim2Ragdoll; | 
				
			||||
 | 
					    List<GameObject> _trackRotations; | 
				
			||||
 | 
					    public List<Quaternion> Rotations; | 
				
			||||
 | 
					    public Vector3[] Points; | 
				
			||||
 | 
					    Vector3[] _lastPoints; | 
				
			||||
 | 
					    public Vector3[] PointVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Stats")] | 
				
			||||
 | 
					    public List<string> ColliderNames; | 
				
			||||
 | 
					    public List<string> RotationNames; | 
				
			||||
 | 
					    public List<string> BodyPartNames; | 
				
			||||
 | 
					    bool _hasLazyInitialized; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    string rootName = "articulation:Hips"; | 
				
			||||
 | 
					    string headName = ""; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void setRootName(string s) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        rootName = s; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void setHeadName(string s) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        headName = s; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnAgentInitialize(Transform defaultTransform, RewardStats orderToCopy = null) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsFalse(_hasLazyInitialized); | 
				
			||||
 | 
					        _hasLazyInitialized = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mapAnim2Ragdoll = defaultTransform.GetComponent<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					        _spawnableEnv = GetComponentInParent<SpawnableEnv>(); | 
				
			||||
 | 
					        _articulationBodyParts = ObjectToTrack | 
				
			||||
 | 
					            .GetComponentsInChildren<ArticulationBody>() | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        _rigidbodyParts = ObjectToTrack | 
				
			||||
 | 
					            .GetComponentsInChildren<Rigidbody>() | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        if (_rigidbodyParts?.Count > 0) | 
				
			||||
 | 
					            _bodyParts = _rigidbodyParts.Select(x => x.gameObject).ToList(); | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					            _bodyParts = _articulationBodyParts.Select(x => x.gameObject).ToList(); | 
				
			||||
 | 
					        _trackRotations = _bodyParts | 
				
			||||
 | 
					            .SelectMany(x => x.GetComponentsInChildren<Transform>()) | 
				
			||||
 | 
					            .Select(x => x.gameObject) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .Where(x => x.GetComponent<Rigidbody>() != null || x.GetComponent<ArticulationBody>() != null) | 
				
			||||
 | 
					            .Where(x=>x.name.StartsWith("articulation:")) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        _colliders = _bodyParts | 
				
			||||
 | 
					            .SelectMany(x => x.GetComponentsInChildren<Collider>()) | 
				
			||||
 | 
					            .Where(x => x.enabled) | 
				
			||||
 | 
					            .Where(x => !x.isTrigger) | 
				
			||||
 | 
					            .Where(x=> { | 
				
			||||
 | 
					                var ignoreCollider = x.GetComponent<IgnoreColliderForReward>(); | 
				
			||||
 | 
					                if (ignoreCollider == null) | 
				
			||||
 | 
					                    return true; | 
				
			||||
 | 
					                return !ignoreCollider.enabled;}) | 
				
			||||
 | 
					            .Distinct() | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        if (orderToCopy != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            _bodyParts = orderToCopy._bodyParts | 
				
			||||
 | 
					                .Select(x => _bodyParts.First(y => y.name == x.name)) | 
				
			||||
 | 
					                .ToList(); | 
				
			||||
 | 
					            _trackRotations = orderToCopy._trackRotations | 
				
			||||
 | 
					                .Select(x => _trackRotations.First(y => y.name == x.name)) | 
				
			||||
 | 
					                .ToList(); | 
				
			||||
 | 
					            _colliders = orderToCopy._colliders | 
				
			||||
 | 
					                .Select(x => _colliders.First(y => y.name == x.name)) | 
				
			||||
 | 
					                .ToList(); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        Points = Enumerable.Range(0, _colliders.Count * 6) | 
				
			||||
 | 
					            .Select(x => Vector3.zero) | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					        _lastPoints = Enumerable.Range(0, _colliders.Count * 6) | 
				
			||||
 | 
					            .Select(x => Vector3.zero) | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					        PointVelocity = Enumerable.Range(0, _colliders.Count * 6) | 
				
			||||
 | 
					            .Select(x => Vector3.zero) | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					        Rotations = Enumerable.Range(0, _trackRotations.Count) | 
				
			||||
 | 
					            .Select(x => Quaternion.identity) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        _root = _bodyParts.First(x => x.name == rootName); | 
				
			||||
 | 
					        _head = _bodyParts.First(x => x.name == headName); | 
				
			||||
 | 
					        transform.position = defaultTransform.position; | 
				
			||||
 | 
					        transform.rotation = defaultTransform.rotation; | 
				
			||||
 | 
					        LastCenterOfMassInWorldSpace = transform.position; | 
				
			||||
 | 
					        HeadPositionInWorldSpace = _head.transform.position; | 
				
			||||
 | 
					        RootPositionInWorldSpace = _root.transform.position; | 
				
			||||
 | 
					        ColliderNames = _colliders | 
				
			||||
 | 
					            .Select(x => x.name) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        RotationNames = _trackRotations | 
				
			||||
 | 
					            .Select(x => x.name) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        BodyPartNames = _bodyParts | 
				
			||||
 | 
					            .Select(x => x.name) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void OnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasLazyInitialized); | 
				
			||||
 | 
					        ResetStatus(); | 
				
			||||
 | 
					        LastIsSet = false; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void ResetStatus() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        LastIsSet = false; | 
				
			||||
 | 
					        var timeDelta = float.MinValue; | 
				
			||||
 | 
					        SetStatusForStep(timeDelta); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void SetStatusForStep(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // get Center Of Mass velocity in f space
 | 
				
			||||
 | 
					        Vector3 newCOM; | 
				
			||||
 | 
					        // if Moocap, then get from anim2Ragdoll
 | 
				
			||||
 | 
					        if (_mapAnim2Ragdoll != null) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            newCOM = _mapAnim2Ragdoll.LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					            var newHorizontalDirection = _mapAnim2Ragdoll.HorizontalDirection; | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            transform.position = newCOM; | 
				
			||||
 | 
					            transform.rotation = Quaternion.Euler(newHorizontalDirection); | 
				
			||||
 | 
					            CenterOfMassVelocity = _mapAnim2Ragdoll.CenterOfMassVelocity; | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitude = _mapAnim2Ragdoll.CenterOfMassVelocityMagnitude; | 
				
			||||
 | 
					            CenterOfMassVelocityInRootSpace = transform.InverseTransformVector(CenterOfMassVelocity); | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitudeInRootSpace = CenterOfMassVelocityInRootSpace.magnitude; | 
				
			||||
 | 
					            HeadPositionInWorldSpace = _mapAnim2Ragdoll.LastHeadPositionInWorldSpace; | 
				
			||||
 | 
					            RootPositionInWorldSpace = _mapAnim2Ragdoll.LastRootPositionInWorldSpace; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        else | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            newCOM = GetCenterOfMass(); | 
				
			||||
 | 
					            var newHorizontalDirection = new Vector3(0f, _root.transform.eulerAngles.y, 0f); | 
				
			||||
 | 
					            if (!LastIsSet) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            transform.position = newCOM; | 
				
			||||
 | 
					            transform.rotation = Quaternion.Euler(newHorizontalDirection); | 
				
			||||
 | 
					            var velocity = newCOM - LastCenterOfMassInWorldSpace; | 
				
			||||
 | 
					            velocity /= timeDelta; | 
				
			||||
 | 
					            CenterOfMassVelocity = velocity; | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitude = CenterOfMassVelocity.magnitude; | 
				
			||||
 | 
					            CenterOfMassVelocityInRootSpace = transform.InverseTransformVector(CenterOfMassVelocity); | 
				
			||||
 | 
					            CenterOfMassVelocityMagnitudeInRootSpace = CenterOfMassVelocityInRootSpace.magnitude; | 
				
			||||
 | 
					            HeadPositionInWorldSpace = _head.transform.position; | 
				
			||||
 | 
					            RootPositionInWorldSpace = _root.transform.position; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        LastCenterOfMassInWorldSpace = newCOM; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        GetAllPoints(Points); | 
				
			||||
 | 
					        if (!LastIsSet) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Array.Copy(Points, 0, _lastPoints, 0, Points.Length); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        for (int i = 0; i < Points.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            PointVelocity[i] = (Points[i] - _lastPoints[i]) / timeDelta; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        Array.Copy(Points, 0, _lastPoints, 0, Points.Length); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        for (int i = 0; i < _trackRotations.Count; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Quaternion localRotation = _trackRotations[i].transform.localRotation; | 
				
			||||
 | 
					            if (_trackRotations[i].gameObject == _root) | 
				
			||||
 | 
					                localRotation = Quaternion.Inverse(transform.rotation) * _trackRotations[i].transform.rotation; | 
				
			||||
 | 
					            Rotations[i] = localRotation; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        LastIsSet = true; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public List<float> GetPointDistancesFrom(RewardStats target) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        List<float> distances = new List<float>(); | 
				
			||||
 | 
					        for (int i = 0; i < Points.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            float distance = (Points[i] - target.Points[i]).magnitude; | 
				
			||||
 | 
					            distances.Add(distance); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        return distances; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public List<float> GetPointVelocityDistancesFrom(RewardStats target) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        List<float> distances = new List<float>(); | 
				
			||||
 | 
					        for (int i = 0; i < PointVelocity.Length; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            float distance = (PointVelocity[i] - target.PointVelocity[i]).magnitude; | 
				
			||||
 | 
					            distances.Add(distance); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        return distances; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void AssertIsCompatible(RewardStats target) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.AreEqual(Points.Length, target.Points.Length); | 
				
			||||
 | 
					        Assert.AreEqual(_lastPoints.Length, target._lastPoints.Length); | 
				
			||||
 | 
					        Assert.AreEqual(PointVelocity.Length, target.PointVelocity.Length); | 
				
			||||
 | 
					        Assert.AreEqual(Points.Length, _lastPoints.Length); | 
				
			||||
 | 
					        Assert.AreEqual(Points.Length, PointVelocity.Length); | 
				
			||||
 | 
					        Assert.AreEqual(_colliders.Count, target._colliders.Count); | 
				
			||||
 | 
					        for (int i = 0; i < _colliders.Count; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            string debugStr = $" _colliders.{_colliders[i].name} vs target._colliders.{target._colliders[i].name}"; | 
				
			||||
 | 
					            Assert.AreEqual(_colliders[i].name, target._colliders[i].name, $"name:{debugStr}"); | 
				
			||||
 | 
					            // Assert.AreEqual(_colliders[i].direction, target._colliders[i].direction, $"direction:{debugStr}");
 | 
				
			||||
 | 
					            // Assert.AreEqual(_colliders[i].height, target._colliders[i].height, $"height:{debugStr}");
 | 
				
			||||
 | 
					            // Assert.AreEqual(_colliders[i].radius, target._colliders[i].radius, $"radius:{debugStr}");
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        Assert.AreEqual(ColliderNames.Count, target.ColliderNames.Count); | 
				
			||||
 | 
					        Assert.AreEqual(RotationNames.Count, target.RotationNames.Count); | 
				
			||||
 | 
					        Assert.AreEqual(BodyPartNames.Count, target.BodyPartNames.Count); | 
				
			||||
 | 
					        for (int i = 0; i < ColliderNames.Count; i++) | 
				
			||||
 | 
					            Assert.AreEqual(ColliderNames[i], target.ColliderNames[i]); | 
				
			||||
 | 
					        for (int i = 0; i < RotationNames.Count; i++) | 
				
			||||
 | 
					            Assert.AreEqual(RotationNames[i], target.RotationNames[i]); | 
				
			||||
 | 
					        for (int i = 0; i < BodyPartNames.Count; i++) | 
				
			||||
 | 
					            Assert.AreEqual(BodyPartNames[i], target.BodyPartNames[i]); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void GetAllPoints(Vector3[] pointBuffer) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        int idx = 0; | 
				
			||||
 | 
					        foreach (var collider in _colliders) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            CapsuleCollider capsule = collider as CapsuleCollider; | 
				
			||||
 | 
					            BoxCollider box = collider as BoxCollider; | 
				
			||||
 | 
					            SphereCollider sphere = collider as SphereCollider; | 
				
			||||
 | 
					            Vector3 c = Vector3.zero; | 
				
			||||
 | 
					            Bounds b = new Bounds(c, c); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (collider.name == "head") | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                c = c; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (capsule != null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                c = capsule.center; | 
				
			||||
 | 
					                var r = capsule.radius * 2; | 
				
			||||
 | 
					                var h = capsule.height; | 
				
			||||
 | 
					                h = Mathf.Max(r, h); // capsules height is clipped at r
 | 
				
			||||
 | 
					                if (capsule.direction == 0) | 
				
			||||
 | 
					                    b = new Bounds(c, new Vector3(h, r, r)); | 
				
			||||
 | 
					                else if (capsule.direction == 1) | 
				
			||||
 | 
					                    b = new Bounds(c, new Vector3(r, h, r)); | 
				
			||||
 | 
					                else if (capsule.direction == 2) | 
				
			||||
 | 
					                    b = new Bounds(c, new Vector3(r, r, h)); | 
				
			||||
 | 
					                else throw new NotImplementedException(); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else if (box != null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                c = box.center; | 
				
			||||
 | 
					                b = new Bounds(c, box.size); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else if (sphere != null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                c = sphere.center; | 
				
			||||
 | 
					                var r = sphere.radius * 2; | 
				
			||||
 | 
					                b = new Bounds(c, new Vector3(r, r, r)); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else | 
				
			||||
 | 
					                throw new NotImplementedException(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Vector3 point1, point2, point3, point4, point5, point6; | 
				
			||||
 | 
					            point1 = new Vector3(b.max.x, c.y, c.z); | 
				
			||||
 | 
					            point2 = new Vector3(b.min.x, c.y, c.z); | 
				
			||||
 | 
					            point3 = new Vector3(c.x, b.max.y, c.z); | 
				
			||||
 | 
					            point4 = new Vector3(c.x, b.min.y, c.z); | 
				
			||||
 | 
					            point5 = new Vector3(c.x, c.y, b.max.z); | 
				
			||||
 | 
					            point6 = new Vector3(c.x, c.y, b.min.z); | 
				
			||||
 | 
					            // from local collider space to world space
 | 
				
			||||
 | 
					            point1 = collider.transform.TransformPoint(point1); | 
				
			||||
 | 
					            point2 = collider.transform.TransformPoint(point2); | 
				
			||||
 | 
					            point3 = collider.transform.TransformPoint(point3); | 
				
			||||
 | 
					            point4 = collider.transform.TransformPoint(point4); | 
				
			||||
 | 
					            point5 = collider.transform.TransformPoint(point5); | 
				
			||||
 | 
					            point6 = collider.transform.TransformPoint(point6); | 
				
			||||
 | 
					            // transform from world space, into local space
 | 
				
			||||
 | 
					            point1 = this.transform.InverseTransformPoint(point1); | 
				
			||||
 | 
					            point2 = this.transform.InverseTransformPoint(point2); | 
				
			||||
 | 
					            point3 = this.transform.InverseTransformPoint(point3); | 
				
			||||
 | 
					            point4 = this.transform.InverseTransformPoint(point4); | 
				
			||||
 | 
					            point5 = this.transform.InverseTransformPoint(point5); | 
				
			||||
 | 
					            point6 = this.transform.InverseTransformPoint(point6); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            pointBuffer[idx++] = point1; | 
				
			||||
 | 
					            pointBuffer[idx++] = point2; | 
				
			||||
 | 
					            pointBuffer[idx++] = point3; | 
				
			||||
 | 
					            pointBuffer[idx++] = point4; | 
				
			||||
 | 
					            pointBuffer[idx++] = point5; | 
				
			||||
 | 
					            pointBuffer[idx++] = point6; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    Vector3 GetCenterOfMass() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        var centerOfMass = Vector3.zero; | 
				
			||||
 | 
					        float totalMass = 0f; | 
				
			||||
 | 
					        foreach (ArticulationBody ab in _articulationBodyParts) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            centerOfMass += ab.worldCenterOfMass * ab.mass; | 
				
			||||
 | 
					            totalMass += ab.mass; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        centerOfMass /= totalMass; | 
				
			||||
 | 
					        // centerOfMass -= _spawnableEnv.transform.position;
 | 
				
			||||
 | 
					        return centerOfMass; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void DrawPointDistancesFrom(RewardStats target, int objIdex) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        int start = 0; | 
				
			||||
 | 
					        int end = Points.Length - 1; | 
				
			||||
 | 
					        if (objIdex >= 0) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            start = objIdex * 6; | 
				
			||||
 | 
					            end = (objIdex * 6) + 6; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        for (int i = start; i < end; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            Gizmos.color = Color.white; | 
				
			||||
 | 
					            var from = Points[i]; | 
				
			||||
 | 
					            var to = target.Points[i]; | 
				
			||||
 | 
					            var toTarget = target.Points[i]; | 
				
			||||
 | 
					            // transform to this object's world space
 | 
				
			||||
 | 
					            from = this.transform.TransformPoint(from); | 
				
			||||
 | 
					            to = this.transform.TransformPoint(to); | 
				
			||||
 | 
					            // transform to target's world space
 | 
				
			||||
 | 
					            toTarget = target.transform.TransformPoint(toTarget); | 
				
			||||
 | 
					            Gizmos.color = Color.white; | 
				
			||||
 | 
					            Gizmos.DrawLine(from, toTarget); | 
				
			||||
 | 
					            // show this objects velocity
 | 
				
			||||
 | 
					            Vector3 velocity = PointVelocity[i]; | 
				
			||||
 | 
					            Gizmos.color = Color.blue; | 
				
			||||
 | 
					            Gizmos.DrawRay(from, velocity); | 
				
			||||
 | 
					            // show targets velocity
 | 
				
			||||
 | 
					            Vector3 velocityTarget = target.PointVelocity[i]; | 
				
			||||
 | 
					            Gizmos.color = Color.green; | 
				
			||||
 | 
					            Gizmos.DrawRay(toTarget, velocityTarget); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 96614916e0da54eff9656e7271dac845 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,432 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using Unity.MLAgents; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					using UnityEngine.Assertions; | 
				
			||||
 | 
					using ManyWorlds; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class Rewards2Learn : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    [Header("Reward")] | 
				
			||||
 | 
					    public float SumOfSubRewards; | 
				
			||||
 | 
					    public float Reward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Position Reward")] | 
				
			||||
 | 
					    public float SumOfDistances; | 
				
			||||
 | 
					    public float SumOfSqrDistances; | 
				
			||||
 | 
					    public float PositionReward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Velocity Reward")] | 
				
			||||
 | 
					    public float PointsVelocityDifferenceSquared; | 
				
			||||
 | 
					    public float PointsVelocityReward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Local Pose Reward")] | 
				
			||||
 | 
					    public List<float> RotationDifferences; | 
				
			||||
 | 
					    public float SumOfRotationDifferences; | 
				
			||||
 | 
					    public float SumOfRotationSqrDifferences; | 
				
			||||
 | 
					    public float LocalPoseReward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Center of Mass Velocity Reward")] | 
				
			||||
 | 
					    public Vector3 MocapCOMVelocity; | 
				
			||||
 | 
					    public Vector3 RagDollCOMVelocity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public float COMVelocityDifference; | 
				
			||||
 | 
					    public float ComVelocityReward; | 
				
			||||
 | 
					    public float ComReward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Center of Mass Direction Reward")] | 
				
			||||
 | 
					    public float ComDirectionDistance; | 
				
			||||
 | 
					    public float ComDirectionReward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Center of Mass Position Reward")] | 
				
			||||
 | 
					    public float ComDistance; | 
				
			||||
 | 
					    public float DistanceFactor; | 
				
			||||
 | 
					    public float ComPositionReward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // [Header("Direction Factor")]
 | 
				
			||||
 | 
					    // public float DirectionDistance;
 | 
				
			||||
 | 
					    // public float DirectionFactor;
 | 
				
			||||
 | 
					    [Header("Velocity Difference Reward")] | 
				
			||||
 | 
					    public float VelDifferenceError; | 
				
			||||
 | 
					    public float VelAvDiffTwoStepsError;  | 
				
			||||
 | 
					    public float VelAvDiffFourStepsError; | 
				
			||||
 | 
					    public float VelDifferenceReward; | 
				
			||||
 | 
					    public float VelDiffTwoStepsReward;  | 
				
			||||
 | 
					    public float VelDiffFourStepsReward; | 
				
			||||
 | 
					    float [][] _velHistoryTwoSteps; | 
				
			||||
 | 
					    float [][] _velHistoryFourSteps; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Minimize Energy Reward")] | 
				
			||||
 | 
					    public float KineticEnergyMetric; | 
				
			||||
 | 
					    public float EnergyMinimReward; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Misc")] | 
				
			||||
 | 
					    public float HeadHeightDistance; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Gizmos")] | 
				
			||||
 | 
					    public int ObjectForPointDistancesGizmo; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    SpawnableEnv _spawnableEnv; | 
				
			||||
 | 
					    MapAnim2Ragdoll _mocap; | 
				
			||||
 | 
					    GameObject _ragDoll; | 
				
			||||
 | 
					    InputController _inputController; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    internal RewardStats _mocapBodyStats; | 
				
			||||
 | 
					    internal RewardStats _ragDollBodyStats; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // List<ArticulationBody> _mocapBodyParts;
 | 
				
			||||
 | 
					    // List<ArticulationBody> _ragDollBodyParts;
 | 
				
			||||
 | 
					    Transform _mocapHead; | 
				
			||||
 | 
					    Transform _ragDollHead; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    bool _hasLazyInitialized; | 
				
			||||
 | 
					    bool _reproduceDReCon; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Things to check for rewards")] | 
				
			||||
 | 
					    public string headname = "head"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public string targetedRootName = "articulation:Hips"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void OnAgentInitialize(bool reproduceDReCon) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsFalse(_hasLazyInitialized); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _hasLazyInitialized = true; | 
				
			||||
 | 
					        _reproduceDReCon = reproduceDReCon; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _spawnableEnv = GetComponentInParent<SpawnableEnv>(); | 
				
			||||
 | 
					        Assert.IsNotNull(_spawnableEnv); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocap = _spawnableEnv.GetComponentInChildren<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _ragDoll = _spawnableEnv.GetComponentInChildren<ProcRagdollAgent>().gameObject; | 
				
			||||
 | 
					        Assert.IsNotNull(_mocap); | 
				
			||||
 | 
					        Assert.IsNotNull(_ragDoll); | 
				
			||||
 | 
					        _inputController = _spawnableEnv.GetComponentInChildren<InputController>(); | 
				
			||||
 | 
					        // _mocapBodyParts = _mocap.GetComponentsInChildren<ArticulationBody>().ToList();
 | 
				
			||||
 | 
					        // _ragDollBodyParts = _ragDoll.GetComponentsInChildren<ArticulationBody>().ToList();
 | 
				
			||||
 | 
					        // Assert.AreEqual(_mocapBodyParts.Count, _ragDollBodyParts.Count);
 | 
				
			||||
 | 
					        _mocapHead = _mocap | 
				
			||||
 | 
					            .GetComponentsInChildren<Transform>() | 
				
			||||
 | 
					            .First(x => x.name == headname); | 
				
			||||
 | 
					        _ragDollHead = _ragDoll | 
				
			||||
 | 
					            .GetComponentsInChildren<Transform>() | 
				
			||||
 | 
					            .First(x => x.name == headname); | 
				
			||||
 | 
					        _mocapBodyStats = new GameObject("MocapDReConRewardStats").AddComponent<RewardStats>(); | 
				
			||||
 | 
					        _mocapBodyStats.setRootName(targetedRootName); | 
				
			||||
 | 
					        _mocapBodyStats.setHeadName(headname); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocapBodyStats.ObjectToTrack = _mocap; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocapBodyStats.transform.SetParent(_spawnableEnv.transform); | 
				
			||||
 | 
					        _mocapBodyStats.OnAgentInitialize(_mocapBodyStats.ObjectToTrack.transform); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _ragDollBodyStats = new GameObject("RagDollDReConRewardStats").AddComponent<RewardStats>(); | 
				
			||||
 | 
					        _ragDollBodyStats.setRootName(targetedRootName); | 
				
			||||
 | 
					        _ragDollBodyStats.setHeadName(headname); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _ragDollBodyStats.ObjectToTrack = this; | 
				
			||||
 | 
					        _ragDollBodyStats.transform.SetParent(_spawnableEnv.transform); | 
				
			||||
 | 
					        _ragDollBodyStats.OnAgentInitialize(transform, _mocapBodyStats); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _velHistoryTwoSteps = new float[][]{ | 
				
			||||
 | 
					            _ragDollBodyStats.PointVelocity | 
				
			||||
 | 
					                .Zip(_mocapBodyStats.PointVelocity, (x,y) => x.magnitude-y.magnitude) | 
				
			||||
 | 
					                .ToArray(), | 
				
			||||
 | 
					            _ragDollBodyStats.PointVelocity | 
				
			||||
 | 
					                .Zip(_mocapBodyStats.PointVelocity, (x,y) => x.magnitude-y.magnitude) | 
				
			||||
 | 
					                .ToArray() | 
				
			||||
 | 
					            }; | 
				
			||||
 | 
					        _velHistoryFourSteps = new float[][]{ | 
				
			||||
 | 
					            _ragDollBodyStats.PointVelocity | 
				
			||||
 | 
					                .Zip(_mocapBodyStats.PointVelocity, (x,y) => x.magnitude-y.magnitude) | 
				
			||||
 | 
					                .ToArray(), | 
				
			||||
 | 
					            _ragDollBodyStats.PointVelocity | 
				
			||||
 | 
					                .Zip(_mocapBodyStats.PointVelocity, (x,y) => x.magnitude-y.magnitude) | 
				
			||||
 | 
					                .ToArray(), | 
				
			||||
 | 
					            _ragDollBodyStats.PointVelocity | 
				
			||||
 | 
					                .Zip(_mocapBodyStats.PointVelocity, (x,y) => x.magnitude-y.magnitude) | 
				
			||||
 | 
					                .ToArray(), | 
				
			||||
 | 
					            _ragDollBodyStats.PointVelocity | 
				
			||||
 | 
					                .Zip(_mocapBodyStats.PointVelocity, (x,y) => x.magnitude-y.magnitude) | 
				
			||||
 | 
					                .ToArray() | 
				
			||||
 | 
					            }; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocapBodyStats.AssertIsCompatible(_ragDollBodyStats); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Update is called once per frame
 | 
				
			||||
 | 
					    public void OnStep(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        _mocapBodyStats.SetStatusForStep(timeDelta); | 
				
			||||
 | 
					        _ragDollBodyStats.SetStatusForStep(timeDelta); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (_reproduceDReCon) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            DReConRewards(timeDelta); | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // deep sort scales
 | 
				
			||||
 | 
					        float num_points = _ragDollBodyStats.Points.Length; | 
				
			||||
 | 
					        float num_joints = num_points / 6f; | 
				
			||||
 | 
					        float pose_scale = 2.0f / 15f * num_joints; | 
				
			||||
 | 
					        float vel_scale = 0.1f / 15f * num_joints; | 
				
			||||
 | 
					        // note is 10 in code, but 40 in paper. 
 | 
				
			||||
 | 
					        const float position_scale = 10f; // was end_eff_scale
 | 
				
			||||
 | 
					        // const float root_scale = 5f;
 | 
				
			||||
 | 
					        const float com_scale = 5f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // DeepMimic
 | 
				
			||||
 | 
					        // const float pose_w = 0.5f;
 | 
				
			||||
 | 
					        // const float vel_w = 0.05f;
 | 
				
			||||
 | 
					        // const float position_w = 0.15f; // was end_eff_w
 | 
				
			||||
 | 
					        // // const float root_w = 0.2f;
 | 
				
			||||
 | 
					        // const float com_w = 0.2f; // * 2
 | 
				
			||||
 | 
					        // const float energy_w = 0.2f;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // // UniCon
 | 
				
			||||
 | 
					        // const float pose_w = 0.4f;
 | 
				
			||||
 | 
					        // const float vel_w = 0.1f;
 | 
				
			||||
 | 
					        // const float position_w = 0.1f;
 | 
				
			||||
 | 
					        // // const float com_direction_w = 0.1f; 
 | 
				
			||||
 | 
					        // const float com_direction_w = 0.2f; 
 | 
				
			||||
 | 
					        // const float com_velocity_w = 0.1f; 
 | 
				
			||||
 | 
					        // const float energy_w = 0.2f;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // MarCon
 | 
				
			||||
 | 
					        const float pose_w = 0.2f; | 
				
			||||
 | 
					        const float position_w = 0.2f; | 
				
			||||
 | 
					        const float com_direction_w = 0.1f;  | 
				
			||||
 | 
					        const float com_velocity_w = 0.3f;  | 
				
			||||
 | 
					        const float energy_w = 0.2f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // position reward
 | 
				
			||||
 | 
					        List<float> distances = _mocapBodyStats.GetPointDistancesFrom(_ragDollBodyStats); | 
				
			||||
 | 
					        List<float> sqrDistances = distances.Select(x=> x*x).ToList(); | 
				
			||||
 | 
					        SumOfDistances = distances.Sum(); | 
				
			||||
 | 
					        SumOfSqrDistances = sqrDistances.Sum(); | 
				
			||||
 | 
					        var deepMimicScaledDistance = SumOfSqrDistances / (num_points / 4); | 
				
			||||
 | 
					        PositionReward = Mathf.Exp(-position_scale * (deepMimicScaledDistance)); | 
				
			||||
 | 
					        if (PositionReward == 0f) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            PositionReward = 0f; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // center of mass velocity reward
 | 
				
			||||
 | 
					        MocapCOMVelocity = _mocapBodyStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        RagDollCOMVelocity = _ragDollBodyStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        COMVelocityDifference = (MocapCOMVelocity-RagDollCOMVelocity).magnitude; | 
				
			||||
 | 
					        ComVelocityReward = Mathf.Pow(COMVelocityDifference,2); | 
				
			||||
 | 
					        ComVelocityReward = Mathf.Exp(-com_scale*ComVelocityReward); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // points velocity
 | 
				
			||||
 | 
					        List<float> velocityDistances = _mocapBodyStats.GetPointVelocityDistancesFrom(_ragDollBodyStats); | 
				
			||||
 | 
					        List<float> sqrVelocityDistances = velocityDistances.Select(x=> x*x).ToList(); | 
				
			||||
 | 
					        PointsVelocityDifferenceSquared = sqrVelocityDistances.Sum(); | 
				
			||||
 | 
					        var deepMimicScaledVelocityDistanceSquared = PointsVelocityDifferenceSquared / (num_points / 4); | 
				
			||||
 | 
					        PointsVelocityReward = Mathf.Exp(-vel_scale * deepMimicScaledVelocityDistanceSquared); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // local pose reward
 | 
				
			||||
 | 
					        if (RotationDifferences == null || RotationDifferences.Count < _mocapBodyStats.Rotations.Count) | 
				
			||||
 | 
					            RotationDifferences = Enumerable.Range(0,_mocapBodyStats.Rotations.Count) | 
				
			||||
 | 
					            .Select(x=>0f) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        SumOfRotationDifferences = 0f; | 
				
			||||
 | 
					        SumOfRotationSqrDifferences = 0f; | 
				
			||||
 | 
					        for (int i = 0; i < _mocapBodyStats.Rotations.Count; i++) | 
				
			||||
 | 
					        {  | 
				
			||||
 | 
					            var angle = Quaternion.Angle(_mocapBodyStats.Rotations[i], _ragDollBodyStats.Rotations[i]); | 
				
			||||
 | 
					            Assert.IsTrue(angle <= 180f); | 
				
			||||
 | 
					            angle = DReConObservationStats.NormalizedAngle(angle); | 
				
			||||
 | 
					            angle = Mathf.Abs(angle); | 
				
			||||
 | 
					            angle = angle / Mathf.PI; | 
				
			||||
 | 
					            var sqrAngle = angle * angle; | 
				
			||||
 | 
					            RotationDifferences[i] = angle; | 
				
			||||
 | 
					            SumOfRotationDifferences += angle; | 
				
			||||
 | 
					            SumOfRotationSqrDifferences += sqrAngle; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        LocalPoseReward = Mathf.Exp(-pose_scale * SumOfRotationSqrDifferences); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // center of mass direction reward (from 0f to 1f)
 | 
				
			||||
 | 
					        ComDirectionDistance = Vector3.Dot(  | 
				
			||||
 | 
					            _mocapBodyStats.transform.forward,  | 
				
			||||
 | 
					            _ragDollBodyStats.transform.forward); | 
				
			||||
 | 
					        ComDirectionDistance = 1f-((ComDirectionDistance + 1f)/2f); | 
				
			||||
 | 
					        ComDirectionReward = ComDirectionDistance; | 
				
			||||
 | 
					        ComDirectionReward = Mathf.Exp(-com_scale*ComDirectionReward); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // // COM velocity factor
 | 
				
			||||
 | 
					        // var comVelocityFactor = COMVelocityDifference;
 | 
				
			||||
 | 
					        // comVelocityFactor = comVelocityFactor / 2f;
 | 
				
			||||
 | 
					        // comVelocityFactor = 1.01f - comVelocityFactor;
 | 
				
			||||
 | 
					        // comVelocityFactor = Mathf.Clamp(comVelocityFactor, 0f, 1f);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Calc Velocity difference Error
 | 
				
			||||
 | 
					        VelDifferenceError = _ragDollBodyStats.PointVelocity | 
				
			||||
 | 
					            .Zip(_mocapBodyStats.PointVelocity, (x,y) => (x-y).magnitude) | 
				
			||||
 | 
					            .Average(); | 
				
			||||
 | 
					        VelDifferenceError = Mathf.Abs(VelDifferenceError); | 
				
			||||
 | 
					        VelDifferenceReward = Mathf.Exp(-10f * VelDifferenceError); | 
				
			||||
 | 
					        VelDifferenceReward = Mathf.Clamp(VelDifferenceReward, 0f, 1f); | 
				
			||||
 | 
					        // roll history
 | 
				
			||||
 | 
					        var oldestTwoSteps = _velHistoryTwoSteps[1]; | 
				
			||||
 | 
					        _velHistoryTwoSteps[1] = _velHistoryTwoSteps[0]; | 
				
			||||
 | 
					        _velHistoryTwoSteps[0] = oldestTwoSteps; | 
				
			||||
 | 
					        var oldestFourSteps = _velHistoryFourSteps[3]; | 
				
			||||
 | 
					        _velHistoryFourSteps[3] = _velHistoryFourSteps[2]; | 
				
			||||
 | 
					        _velHistoryFourSteps[2] = _velHistoryFourSteps[1]; | 
				
			||||
 | 
					        _velHistoryFourSteps[1] = _velHistoryFourSteps[0]; | 
				
			||||
 | 
					        _velHistoryFourSteps[0] = oldestFourSteps; | 
				
			||||
 | 
					        int velRows = _ragDollBodyStats.PointVelocity.Length;      | 
				
			||||
 | 
					        for (int i = 0; i < velRows; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var diff = _ragDollBodyStats.PointVelocity[i]-_mocapBodyStats.PointVelocity[i]; | 
				
			||||
 | 
					            var sqDiff = diff.magnitude*diff.magnitude; | 
				
			||||
 | 
					            var absDiff = Mathf.Abs(diff.magnitude); | 
				
			||||
 | 
					            oldestTwoSteps[i] = absDiff; | 
				
			||||
 | 
					            oldestFourSteps[i] = absDiff; | 
				
			||||
 | 
					            // oldestTwoSteps[i] = sqDiff;
 | 
				
			||||
 | 
					            // oldestFourSteps[i] = sqDiff;
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        VelAvDiffTwoStepsError =  | 
				
			||||
 | 
					            _velHistoryTwoSteps[0].Sum() + | 
				
			||||
 | 
					            _velHistoryTwoSteps[1].Sum(); | 
				
			||||
 | 
					        VelAvDiffTwoStepsError /= velRows*2f; | 
				
			||||
 | 
					        VelAvDiffFourStepsError =  | 
				
			||||
 | 
					            _velHistoryFourSteps[0].Sum() + | 
				
			||||
 | 
					            _velHistoryFourSteps[1].Sum() + | 
				
			||||
 | 
					            _velHistoryFourSteps[2].Sum() + | 
				
			||||
 | 
					            _velHistoryFourSteps[3].Sum(); | 
				
			||||
 | 
					        VelAvDiffFourStepsError /= velRows*4f; | 
				
			||||
 | 
					        VelDiffTwoStepsReward = Mathf.Exp(-10 * VelAvDiffTwoStepsError); | 
				
			||||
 | 
					        VelDiffFourStepsReward = Mathf.Exp(-10 * VelAvDiffFourStepsError); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // calculate energy:
 | 
				
			||||
 | 
					        //we obviate the masses, we want this to be important all across
 | 
				
			||||
 | 
					        List<float> es = _ragDollBodyStats.PointVelocity.Select(x => x.magnitude * x.magnitude).ToList<float>(); | 
				
			||||
 | 
					        KineticEnergyMetric = es.Sum() / es.Count; | 
				
			||||
 | 
					        //a quick run  suggests the input values range between 0 and 10, with most values near 0, so a simple way to get a reward value between 0 and 1 seems:
 | 
				
			||||
 | 
					        EnergyMinimReward = Mathf.Exp(-KineticEnergyMetric); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // misc
 | 
				
			||||
 | 
					        HeadHeightDistance = (_mocapHead.position.y - _ragDollHead.position.y); | 
				
			||||
 | 
					        HeadHeightDistance = Mathf.Abs(HeadHeightDistance); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // reward
 | 
				
			||||
 | 
					        // SumOfSubRewards = ComPositionReward+ComVelocityReward+ComDirectionReward+PositionReward+LocalPoseReward+PointsVelocityReward+VelDifferenceReward;
 | 
				
			||||
 | 
					        SumOfSubRewards = ComVelocityReward+ComDirectionReward+PositionReward+LocalPoseReward+VelDifferenceReward; | 
				
			||||
 | 
					        Reward = 0f + | 
				
			||||
 | 
					                    (ComVelocityReward * com_velocity_w) + // com_w) +
 | 
				
			||||
 | 
					                    (ComDirectionReward * com_direction_w) + // com_w) +
 | 
				
			||||
 | 
					                    (PositionReward * position_w) + | 
				
			||||
 | 
					                    (LocalPoseReward * pose_w) + | 
				
			||||
 | 
					                    // (PointsVelocityReward * vel_w) +
 | 
				
			||||
 | 
					                    (VelDifferenceReward * energy_w); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // Reward = Reward + EnergyMinimReward;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // var sqrtComVelocityReward = Mathf.Sqrt(ComVelocityReward);
 | 
				
			||||
 | 
					        // var sqrtComDirectionReward = Mathf.Sqrt(ComDirectionReward);
 | 
				
			||||
 | 
					        // Reward *= (sqrtComVelocityReward*sqrtComDirectionReward);      
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void DReConRewards(float timeDelta) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        // position reward
 | 
				
			||||
 | 
					        List<float> distances = _mocapBodyStats.GetPointDistancesFrom(_ragDollBodyStats); | 
				
			||||
 | 
					        PositionReward = -7.37f / (distances.Count / 6f); | 
				
			||||
 | 
					        List<float> sqrDistances = distances.Select(x => x * x).ToList(); | 
				
			||||
 | 
					        SumOfDistances = distances.Sum(); | 
				
			||||
 | 
					        SumOfSqrDistances = sqrDistances.Sum(); | 
				
			||||
 | 
					        PositionReward *= SumOfSqrDistances; | 
				
			||||
 | 
					        PositionReward = Mathf.Exp(PositionReward); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // center of mass velocity reward
 | 
				
			||||
 | 
					        MocapCOMVelocity = _mocapBodyStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        RagDollCOMVelocity = _ragDollBodyStats.CenterOfMassVelocity; | 
				
			||||
 | 
					        COMVelocityDifference = (MocapCOMVelocity - RagDollCOMVelocity).magnitude; | 
				
			||||
 | 
					        ComReward = -Mathf.Pow(COMVelocityDifference, 2); | 
				
			||||
 | 
					        ComReward = Mathf.Exp(ComReward); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // points velocity
 | 
				
			||||
 | 
					        List<float> velocityDistances = _mocapBodyStats.GetPointVelocityDistancesFrom(_ragDollBodyStats); | 
				
			||||
 | 
					        List<float> sqrVelocityDistances = velocityDistances.Select(x => x * x).ToList(); | 
				
			||||
 | 
					        PointsVelocityDifferenceSquared = sqrVelocityDistances.Sum(); | 
				
			||||
 | 
					        PointsVelocityReward = (-1f / _mocapBodyStats.PointVelocity.Length) * PointsVelocityDifferenceSquared; | 
				
			||||
 | 
					        PointsVelocityReward = Mathf.Exp(PointsVelocityReward); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // local pose reward
 | 
				
			||||
 | 
					        if (RotationDifferences == null || RotationDifferences.Count < _mocapBodyStats.Rotations.Count) | 
				
			||||
 | 
					            RotationDifferences = Enumerable.Range(0, _mocapBodyStats.Rotations.Count) | 
				
			||||
 | 
					            .Select(x => 0f) | 
				
			||||
 | 
					            .ToList(); | 
				
			||||
 | 
					        SumOfRotationDifferences = 0f; | 
				
			||||
 | 
					        SumOfRotationSqrDifferences = 0f; | 
				
			||||
 | 
					        for (int i = 0; i < _mocapBodyStats.Rotations.Count; i++) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var angle = Quaternion.Angle(_mocapBodyStats.Rotations[i], _ragDollBodyStats.Rotations[i]); | 
				
			||||
 | 
					            Assert.IsTrue(angle <= 180f); | 
				
			||||
 | 
					            angle = ObservationStats.NormalizedAngle(angle); | 
				
			||||
 | 
					            var sqrAngle = angle * angle; | 
				
			||||
 | 
					            RotationDifferences[i] = angle; | 
				
			||||
 | 
					            SumOfRotationDifferences += angle; | 
				
			||||
 | 
					            SumOfRotationSqrDifferences += sqrAngle; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        LocalPoseReward = -6.5f / RotationDifferences.Count; | 
				
			||||
 | 
					        LocalPoseReward *= SumOfRotationSqrDifferences; | 
				
			||||
 | 
					        LocalPoseReward = Mathf.Exp(LocalPoseReward); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // distance factor
 | 
				
			||||
 | 
					        ComDistance = (_mocapBodyStats.LastCenterOfMassInWorldSpace - _ragDollBodyStats.LastCenterOfMassInWorldSpace).magnitude; | 
				
			||||
 | 
					        HeadHeightDistance = (_mocapHead.position.y - _ragDollHead.position.y); | 
				
			||||
 | 
					        HeadHeightDistance = Mathf.Abs(HeadHeightDistance); | 
				
			||||
 | 
					        var headDistance = (_mocapBodyStats.HeadPositionInWorldSpace - _ragDollBodyStats.HeadPositionInWorldSpace).magnitude; | 
				
			||||
 | 
					        DistanceFactor = Mathf.Pow(headDistance, 2); | 
				
			||||
 | 
					        DistanceFactor = 1.4f * DistanceFactor; | 
				
			||||
 | 
					        DistanceFactor = 1.3f - DistanceFactor; | 
				
			||||
 | 
					        DistanceFactor = Mathf.Clamp(DistanceFactor, 0f, 1f); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // // direction factor
 | 
				
			||||
 | 
					        // Vector3 desiredDirection = _inputController.HorizontalDirection;
 | 
				
			||||
 | 
					        // var curDirection = _ragDollBodyStats.transform.forward;
 | 
				
			||||
 | 
					        // // cosAngle
 | 
				
			||||
 | 
					        // var directionDifference = Vector3.Dot(desiredDirection, curDirection);
 | 
				
			||||
 | 
					        // DirectionDistance = (1f + directionDifference) /2f; // normalize the error 
 | 
				
			||||
 | 
					        // DirectionFactor = Mathf.Pow(DirectionDistance,2);
 | 
				
			||||
 | 
					        // DirectionFactor = Mathf.Clamp(DirectionFactor, 0f, 1f);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // misc
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // reward
 | 
				
			||||
 | 
					        SumOfSubRewards = PositionReward + ComReward + PointsVelocityReward + LocalPoseReward; | 
				
			||||
 | 
					        Reward = DistanceFactor * SumOfSubRewards; | 
				
			||||
 | 
					        // Reward = (DirectionFactor*SumOfSubRewards) * DistanceFactor;
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    public void OnReset() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Assert.IsTrue(_hasLazyInitialized); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _mocapBodyStats.OnReset(); | 
				
			||||
 | 
					        _ragDollBodyStats.OnReset(); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    void OnDrawGizmos() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (_ragDollBodyStats == null) | 
				
			||||
 | 
					            return; | 
				
			||||
 | 
					        var max = (_ragDollBodyStats.Points.Length / 6) - 1; | 
				
			||||
 | 
					        ObjectForPointDistancesGizmo = Mathf.Clamp(ObjectForPointDistancesGizmo, -1, max); | 
				
			||||
 | 
					        // _mocapBodyStats.DrawPointDistancesFrom(_ragDollBodyStats, ObjectForPointDistancesGizmo);
 | 
				
			||||
 | 
					        _ragDollBodyStats.DrawPointDistancesFrom(_mocapBodyStats, ObjectForPointDistancesGizmo); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 30315637017c648e4966045b4e088c22 | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,960 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					//using System;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					using Unity.MLAgents.Policies; | 
				
			||||
 | 
					using Unity.MLAgents; | 
				
			||||
 | 
					using System.Linq; | 
				
			||||
 | 
					using Unity.Barracuda; | 
				
			||||
 | 
					using System.ComponentModel; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public class TrainingEnvironmentGenerator : MonoBehaviour | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("The animated character:")] | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Animator characterReference; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Transform characterReferenceHead; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Transform characterReferenceRoot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("do not include the root nor the neck")] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Transform[] characterSpine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("fingers will be excluded from physics-learning")] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Transform[] characterReferenceHands; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //we assume here is the end-effector, but feet have an articulaiton (sensors will be placed on these and their immediate parents)
 | 
				
			||||
 | 
					    //strategy to be checked: if for a quadruped we add the 4 feet here, does it work?
 | 
				
			||||
 | 
					    [Tooltip("same as above but not taking into account fingers. Put the last joint")] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Transform[] characterReferenceFeet; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("How we want the generated assets stored:")] | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    string AgentName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    string TrainingEnvName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Configuration options:")] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    string LearningConfigName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Range(0, 359)] | 
				
			||||
 | 
					    public int MinROMNeededForJoint = 0; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Tooltip("body mass in grams/ml")] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    float massdensity = 1.01f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					     | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    string trainingLayerName = "marathon"; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //[SerializeField]
 | 
				
			||||
 | 
					    //ROMparserSwingTwist ROMparser;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    public RangeOfMotionValues info2store; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [Header("Prefabs to generate training environment:")] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    ManyWorlds.SpawnableEnv referenceSpawnableEnvironment; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Material trainerMaterial; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    PhysicMaterial colliderMaterial; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //things generated procedurally that we store to configure after the generation of the environment:
 | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Animator character4training; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Animator character4synthesis; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [HideInInspector][SerializeField] | 
				
			||||
 | 
					    ManyWorlds.SpawnableEnv _outcome; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					     | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    List<ArticulationBody> articulatedJoints; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    [HideInInspector] | 
				
			||||
 | 
					    [SerializeField] | 
				
			||||
 | 
					    Muscles muscleteam; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public ManyWorlds.SpawnableEnv Outcome{ get { return _outcome; } } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Start is called before the first frame update
 | 
				
			||||
 | 
					    void Start() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					         | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Update is called once per frame
 | 
				
			||||
 | 
					    void Update() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					         | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void GenerateTrainingEnv() { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        character4training = Instantiate(characterReference.gameObject).GetComponent<Animator>(); | 
				
			||||
 | 
					        character4training.gameObject.SetActive(true); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //we assume there is an animated controller
 | 
				
			||||
 | 
					        //
 | 
				
			||||
 | 
					        //
 | 
				
			||||
 | 
					        //possibly, we will need to add  controllers):
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (character4training.GetComponent<IAnimationController>() == null) | 
				
			||||
 | 
					            character4training.gameObject.AddComponent<DefaultAnimationController>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        MapAnim2Ragdoll mca =character4training.gameObject.AddComponent<MapAnim2Ragdoll>(); | 
				
			||||
 | 
					        //mca.IsGeneratedProcedurally = true;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        character4training.gameObject.AddComponent<TrackBodyStatesInWorldSpace>(); | 
				
			||||
 | 
					        character4training.name = "Source:" + AgentName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        SkinnedMeshRenderer[] renderers = character4training.GetComponentsInChildren<SkinnedMeshRenderer>(); | 
				
			||||
 | 
					        foreach (SkinnedMeshRenderer r in renderers) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Material[] mats = r.sharedMaterials; | 
				
			||||
 | 
					            for (int i =0; i < mats.Length; i++) { | 
				
			||||
 | 
					                mats[i] = trainerMaterial; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            r.sharedMaterials = mats; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					         | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        character4synthesis = Instantiate(characterReference.gameObject).GetComponent<Animator>(); | 
				
			||||
 | 
					        character4synthesis.gameObject.SetActive(true); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        character4synthesis.name = "Result:" + AgentName ; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //we remove everything except the transform
 | 
				
			||||
 | 
					        UnityEngine.Component[] list = character4synthesis.GetComponents(typeof(UnityEngine.Component)); | 
				
			||||
 | 
					        foreach (UnityEngine.Component c in list) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (c is Transform || c is Animator || c is CharacterController) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                DestroyImmediate(c); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        character4synthesis.GetComponent<Animator>().runtimeAnimatorController = null; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        MapRagdoll2Anim rca = character4synthesis.gameObject.AddComponent<MapRagdoll2Anim>(); | 
				
			||||
 | 
					       | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _outcome = Instantiate(referenceSpawnableEnvironment).GetComponent<ManyWorlds.SpawnableEnv>(); | 
				
			||||
 | 
					        _outcome.name = TrainingEnvName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ProcRagdollAgent ragdollMarathon = generateRagDollFromAnimatedSource(rca, _outcome); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Transform[] ts= ragdollMarathon.transform.GetComponentsInChildren<Transform>(); | 
				
			||||
 | 
					        foreach (Transform t in ts) { | 
				
			||||
 | 
					            t.gameObject.layer = LayerMask.NameToLayer(trainingLayerName); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        addTrainingParameters(rca, ragdollMarathon); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //UNITY BUG
 | 
				
			||||
 | 
					        //This below seems to make it crash. My guess is that:
 | 
				
			||||
 | 
					        /* | 
				
			||||
 | 
					        ArticulationBody is a normal component, but it also does some odd thing: it affects the physical simluation, since it is a rigidBody plus an articulatedJoint. The way it is defined is that it has the properties of a rigidBody, but it ALSO uses the hierarchy of transforms  to define a chain of articulationJoints, with their rotation constraints, etc. Most notably, the ArticulationBody that is highest in the root gets assigned a property automatically, "isRoot", which means it's physics constraints are different.My guess is that when you change the hierarchy in the editor, at some point in the future the chain of ArticulationBody recalculates who is the root, and changes its properties. However since this relates to physics, it is not done in the same thread. | 
				
			||||
 | 
					If the script doing this is short, it works because this is finished before the update of the ArticulationBody chain is triggered. But when I add more functionality, the script lasts longer, and then it crashes. This is why I kept getting those Physx errors, and why it kept happening in a not-so-reliable way, because we do not have any way to know when this recalculation is done.The fact that ArticulationBody is a fairly recent addition to Unity also makes me suspect they did not debug it properly.The solution seems to be to do all the setup while having the game objects that have articulationBody components with no hierarchy changes, and also having the rootgameobject inactive. When I do this,  I am guessing it does not trigger the update of the ArticulationBody chain. | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        I seem to have a reliable crash: | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            1.if I use ragdollroot.gameObject.SetActive(true) at the end of my configuration script, it crashes. | 
				
			||||
 | 
					            2.if I comment that line, it does not. | 
				
			||||
 | 
					            3.if I set it to active manually, through the editor, after running the script with that line commented, it works. | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        */ | 
				
			||||
 | 
					        //ragdoll4training.gameObject.SetActive(true);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _outcome.GetComponent<RenderingOptions>().ragdollcontroller = ragdollMarathon.gameObject; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        character4training.transform.SetParent(_outcome.transform); | 
				
			||||
 | 
					        _outcome.GetComponent<RenderingOptions>().movementsource = character4training.gameObject; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        character4synthesis.transform.SetParent(_outcome.transform); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //ragdoll4training.gameObject.SetActive(true);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /* | 
				
			||||
 | 
					    public void activateRagdoll() { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        RagDollAgent ragdoll4training = _outcome.GetComponentInChildren<RagDollAgent>(true); | 
				
			||||
 | 
					        if(ragdoll4training!=null) | 
				
			||||
 | 
					            ragdoll4training.gameObject.SetActive(true); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    */ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					ProcRagdollAgent  generateRagDollFromAnimatedSource( MapRagdoll2Anim target, ManyWorlds.SpawnableEnv trainingenv) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    | 
				
			||||
 | 
					        GameObject temp = GameObject.Instantiate(target.gameObject); | 
				
			||||
 | 
					         | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //1. we remove everything we do not need:
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //1.1 we remove meshes
 | 
				
			||||
 | 
					        SkinnedMeshRenderer[] renderers = temp.GetComponentsInChildren<SkinnedMeshRenderer>(); | 
				
			||||
 | 
					        foreach (SkinnedMeshRenderer rend in renderers) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if(rend.gameObject != null) | 
				
			||||
 | 
					                DestroyImmediate(rend.gameObject); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //1.2 we remove everything except the transforms
 | 
				
			||||
 | 
					        UnityEngine.Component[] list = temp.GetComponents(typeof(UnityEngine.Component)); | 
				
			||||
 | 
					        foreach (UnityEngine.Component c in list) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (c is Transform) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					            else { | 
				
			||||
 | 
					                DestroyImmediate(c); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //1.3 we also remove any renderers from the ragdoll
 | 
				
			||||
 | 
					        var meshNamesToDelete = temp.GetComponentsInChildren<MeshRenderer>() | 
				
			||||
 | 
					            .Select(x=>x.name) | 
				
			||||
 | 
					            .ToArray(); | 
				
			||||
 | 
					        foreach (var name in meshNamesToDelete) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var toDel = temp.GetComponentsInChildren<Transform>().First(x=>x.name == name); | 
				
			||||
 | 
					            toDel.transform.parent = null; | 
				
			||||
 | 
					            GameObject.DestroyImmediate(toDel.gameObject); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					         | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        temp.name = "Ragdoll:" + AgentName ; | 
				
			||||
 | 
					        muscleteam=  temp.AddComponent<Muscles>(); | 
				
			||||
 | 
					        temp.transform.position = target.transform.position; | 
				
			||||
 | 
					        temp.transform.rotation = target.transform.rotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //1.4 we drop the sons of the limbs (to avoid including fingers in the following procedural steps)
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Transform[] pack = temp.GetComponentsInChildren<Transform>(); | 
				
			||||
 | 
					        Transform root = pack.First<Transform>(x => x.name == characterReferenceRoot.name); | 
				
			||||
 | 
					        Transform[] joints = root.transform.GetComponentsInChildren<Transform>(); | 
				
			||||
 | 
					        List<Transform> childstodelete = new List<Transform>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (Transform t in characterReferenceHands) { | 
				
			||||
 | 
					            string limbname = t.name;// + "(Clone)";
 | 
				
			||||
 | 
					            //Debug.Log("checking sons of: " + limbname);
 | 
				
			||||
 | 
					            Transform limb = joints.First<Transform>(x => x.name == limbname); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Transform[] sons = limb.GetComponentsInChildren<Transform>(); | 
				
			||||
 | 
					            foreach (Transform t2 in sons) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                if(t2.name != limb.name) | 
				
			||||
 | 
					                    childstodelete.Add(t2); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Transform headJoint = joints.First<Transform>(x => x.name == characterReferenceHead.name); | 
				
			||||
 | 
					        //if there are eyes or head top, we also remove them
 | 
				
			||||
 | 
					        foreach (Transform child in headJoint) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					                childstodelete.Add(child); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					         | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        List<Transform> listofjoints = new List<Transform>(joints); | 
				
			||||
 | 
					        foreach (Transform t2 in childstodelete) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            listofjoints.Remove(t2); | 
				
			||||
 | 
					            t2.DetachChildren();//otherwise, it tries to destroy the children later, and fails.
 | 
				
			||||
 | 
					            DestroyImmediate(t2.gameObject); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //2. We add articulationBody and Collider components
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //2.1 for each remaining joint we add an articulationBody and a collider for each bone
 | 
				
			||||
 | 
					        joints = listofjoints.ToArray(); | 
				
			||||
 | 
					        articulatedJoints = new List<ArticulationBody>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        List<Collider> colliders = new List<Collider>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        List<HandleOverlap> hos = new List<HandleOverlap>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (Transform j in joints) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					      | 
				
			||||
 | 
					            ArticulationBody ab = j.gameObject.AddComponent<ArticulationBody>(); | 
				
			||||
 | 
					            ab.anchorRotation = Quaternion.identity; | 
				
			||||
 | 
					            ab.mass = 0.1f; | 
				
			||||
 | 
					            ab.jointType = ArticulationJointType.FixedJoint; | 
				
			||||
 | 
					            articulatedJoints.Add(ab); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            string namebase = j.name.Replace("(Clone)", "");//probably not needed
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            j.name = "articulation:" + namebase; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            GameObject go = new GameObject(); | 
				
			||||
 | 
					            go.transform.position = j.gameObject.transform.position; | 
				
			||||
 | 
					            go.transform.parent = j.gameObject.transform; | 
				
			||||
 | 
					            go.name = "collider:" + namebase; | 
				
			||||
 | 
					            CapsuleCollider c = go.AddComponent<CapsuleCollider>(); | 
				
			||||
 | 
					            c.material = colliderMaterial; | 
				
			||||
 | 
					            c.height = .06f; | 
				
			||||
 | 
					            c.radius = c.height; | 
				
			||||
 | 
					            colliders.Add(c); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					           HandleOverlap ho= go.AddComponent<HandleOverlap>(); | 
				
			||||
 | 
					            hos.Add(ho); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            go.AddComponent<IgnoreColliderForObservation>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //2.1bis we also handle the Parents in HandleOverlap:
 | 
				
			||||
 | 
					        foreach (HandleOverlap ho in hos) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //the dad is the articulationBody, the grandDad is the articulationBody's parent
 | 
				
			||||
 | 
					            string nameDadRef = ho.transform.parent.parent.name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (nameDadRef == null) { | 
				
			||||
 | 
					                //Debug.Log("my name is: " + ho.name + "and I have no granddad");
 | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            string nameColliderDadRef = "collider:" + nameDadRef.Replace("articulation:", ""); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Collider colliderDad = colliders.FirstOrDefault<Collider>(c => c.name.Equals(nameColliderDadRef)); | 
				
			||||
 | 
					            if (colliderDad == null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                //Debug.Log("my name is: " + ho.name + "  and I have no collider Dad named " + nameColliderDadRef);
 | 
				
			||||
 | 
					                //this should happen only with the hips collider, because the granddad is not part of the articulationBody hierarchy
 | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            ho.Parent = colliderDad.gameObject; | 
				
			||||
 | 
					            //Debug.Log("set up " + ho.name + "  with dad: " + colliderDad.name);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //CAUTION! it is important to deactivate the hierarchy BEFORE we add ArticulationBody members,
 | 
				
			||||
 | 
					        // Doing it afterwards, and having it active, makes the entire thing crash 
 | 
				
			||||
 | 
					        temp.transform.parent = trainingenv.transform; | 
				
			||||
 | 
					        temp.gameObject.SetActive(false); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //2.2 we configure the colliders, in general
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //  List<string> colliderNamesToDelete = new List<string>();
 | 
				
			||||
 | 
					        foreach (CapsuleCollider c in colliders) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            string namebase = c.name.Replace("collider:", ""); | 
				
			||||
 | 
					            Transform j = joints.First(x=>x.name=="articulation:" + namebase); | 
				
			||||
 | 
					            // if not ArticulationBody, skip
 | 
				
			||||
 | 
					            var articulatedDad = j.GetComponent<ArticulationBody>(); | 
				
			||||
 | 
					            if (articulatedDad == null) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //this works when childCount = 1
 | 
				
			||||
 | 
					            j = joints.FirstOrDefault(x=>x.transform.parent.name=="articulation:" + namebase); | 
				
			||||
 | 
					            if (j==null) //these are the end points: feets and hands and head
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                if (namebase == characterReferenceHead.name) | 
				
			||||
 | 
					                { | 
				
			||||
 | 
					                    //neck displacement, relative to spine2:
 | 
				
			||||
 | 
					                    Vector3 displacement = c.transform.parent.position - c.transform.parent.parent.position; | 
				
			||||
 | 
					                    c.transform.position += displacement; | 
				
			||||
 | 
					                    c.radius = 2 * c.radius; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                //Debug.Log("no joint found associated with: " + "articulation:"  + namebase);
 | 
				
			||||
 | 
					                // mark to delete as is an end point
 | 
				
			||||
 | 
					                //colliderNamesToDelete.Add(c.name);
 | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            ArticulationBody ab = j.GetComponent<ArticulationBody>(); | 
				
			||||
 | 
					            if (ab == null || ab.transform == joints[0]) | 
				
			||||
 | 
					                continue; | 
				
			||||
 | 
					            Vector3 dadPosition = articulatedDad.transform.position; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Vector3 sonPosition = j.transform.position; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (articulatedDad.transform.childCount > 2) //2 is the next AB plus the collider
 | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                sonPosition = Vector3.zero; | 
				
			||||
 | 
					                int i = 0; | 
				
			||||
 | 
					                foreach (ArticulationBody tmp in articulatedDad.GetComponentsInChildren<ArticulationBody>()) { | 
				
			||||
 | 
					                    sonPosition += tmp.transform.position; | 
				
			||||
 | 
					                    i++; | 
				
			||||
 | 
					                } | 
				
			||||
 | 
					                sonPosition /= i; | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					       | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //ugly but it seems to work.
 | 
				
			||||
 | 
					            Vector3 direction = (dadPosition - sonPosition).normalized; | 
				
			||||
 | 
					            float[] directionarray = new float[3] { Mathf.Abs(direction.x), Mathf.Abs(direction.y), Mathf.Abs(direction.z) }; | 
				
			||||
 | 
					            float maxdir = Mathf.Max(directionarray); | 
				
			||||
 | 
					            List<float> directionlist = new List<float>(directionarray); | 
				
			||||
 | 
					            c.direction = directionlist.IndexOf(maxdir); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if(namebase != characterReferenceRoot.name) | 
				
			||||
 | 
					                c.center = (sonPosition - dadPosition) / 2.0f; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //to calculate the weight
 | 
				
			||||
 | 
					            c.height = Vector3.Distance(dadPosition, sonPosition); | 
				
			||||
 | 
					            c.radius = c.height / 7; | 
				
			||||
 | 
					            ab = c.transform.parent.GetComponent<ArticulationBody>(); | 
				
			||||
 | 
					            ab.mass = massdensity *  Mathf.PI * c.radius *c.radius *c.height * Mathf.Pow(10,3); //we are aproximating as a cylinder, assuming it wants it in kg
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        // we do not delete end colliders as seams to delete feet
 | 
				
			||||
 | 
					        // foreach (var name in colliderNamesToDelete)
 | 
				
			||||
 | 
					        // {
 | 
				
			||||
 | 
					        //     var toDel = colliders.First(x=>x.name == name);
 | 
				
			||||
 | 
					        //     colliders.Remove(toDel);
 | 
				
			||||
 | 
					        //     GameObject.DestroyImmediate(toDel);
 | 
				
			||||
 | 
					        // }
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //2.3 we add a special treatment for the elements in the spine to have larger colliders: 
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //we estimate the width of the character:
 | 
				
			||||
 | 
					        float bodyWidth = 0; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (Transform spineJoint in characterSpine) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            int childCount = spineJoint.childCount; | 
				
			||||
 | 
					       | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (childCount > 1)//so, shoulders plus neck
 | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                int testIndex = 0; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                Vector2 range = Vector2.zero; | 
				
			||||
 | 
					                foreach (Transform child in spineJoint) | 
				
			||||
 | 
					                { | 
				
			||||
 | 
					                     | 
				
			||||
 | 
					                    if (child.localPosition.x < range[0]) | 
				
			||||
 | 
					                        range[0] = child.localPosition.x; | 
				
			||||
 | 
					                    if (child.localPosition.x > range[1]) | 
				
			||||
 | 
					                        range[1] = child.localPosition.x; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    testIndex++; | 
				
			||||
 | 
					                } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                bodyWidth = 2.5f * (range[1] - range[0]); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                Debug.Log("spineJoint " + spineJoint.name + "has " + childCount +  "childs  and iterates" +  testIndex +    "which gives a body width estimated at: " + bodyWidth); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                //TODO: remove colliders in shoulders.
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //we put the right orientation and size:
 | 
				
			||||
 | 
					        foreach (CapsuleCollider c in colliders) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            string namebase = c.name.Replace("collider:", ""); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Transform spineJoint = characterSpine.FirstOrDefault(x => x.name == namebase); | 
				
			||||
 | 
					            if (spineJoint == null) { | 
				
			||||
 | 
					                if (namebase == characterReferenceRoot.name)//we check if it is the root
 | 
				
			||||
 | 
					                    spineJoint = characterReferenceRoot; | 
				
			||||
 | 
					                else | 
				
			||||
 | 
					                    continue; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Transform j = joints.First(x => x.name == "articulation:" + namebase); | 
				
			||||
 | 
					            // if not ArticulationBody, skip
 | 
				
			||||
 | 
					            var aDad = j.GetComponent<ArticulationBody>(); | 
				
			||||
 | 
					            Vector3 dadPosition = aDad.transform.position; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                        | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //we put it horizontal
 | 
				
			||||
 | 
					            c.direction = 0;// direction.x;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					             | 
				
			||||
 | 
					            float wide = c.height;//the height was previously calculated as a distance between successors
 | 
				
			||||
 | 
					            c.radius = wide / 2; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //c.height = 2 * wide;
 | 
				
			||||
 | 
					            c.height = bodyWidth; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            | 
				
			||||
 | 
					            aDad.mass = massdensity * Mathf.PI * c.radius * c.radius * c.height * Mathf.Pow(10, 3); //we are aproximating as a cylinder, assuming it wants it in kg
 | 
				
			||||
 | 
					            | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //we remove colliders from the shoulders, since they interfer with the collision structure
 | 
				
			||||
 | 
					        foreach (Transform spineJoint in characterSpine) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            int childCount = spineJoint.childCount; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (childCount > 1)//so, shoulders plus neck
 | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                | 
				
			||||
 | 
					                foreach (Transform child in spineJoint) | 
				
			||||
 | 
					                { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    //a.we find the corresponding collider
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    string nameRef = child.name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    string nameColliderRef = "collider:" + nameRef; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    Collider C2delete = colliders.FirstOrDefault<Collider>(x => x.name.Equals(nameColliderRef)); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    //b.we find the collider corresponding to its child, update the Parent chain to skip the reference cllider
 | 
				
			||||
 | 
					                    Transform t = child.GetChild(0); | 
				
			||||
 | 
					                    Collider Cson = colliders.FirstOrDefault<Collider>(x => x.name.Equals("collider:" + t.name)); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    Cson.GetComponent<HandleOverlap>().Parent = C2delete.GetComponent<HandleOverlap>().Parent; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                    //c.we destruct the corresponding collider
 | 
				
			||||
 | 
					                    colliders.Remove(C2delete); | 
				
			||||
 | 
					                    DestroyImmediate(C2delete.gameObject); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					                } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //2.4 we add sensors in feet to detect collisions
 | 
				
			||||
 | 
					        addSensorsInFeet(root); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //since we replaced 2 capsulecollider by two box collideR:
 | 
				
			||||
 | 
					        colliders = new List<Collider>(root.GetComponentsInChildren<Collider>()); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //2.5 we make sure the key elements are added in the observations:
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (Collider c in colliders) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            string namebase = c.name.Replace("collider:", ""); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            List<Transform> stuff2observe = new List<Transform>(characterReferenceHands); | 
				
			||||
 | 
					            stuff2observe.AddRange(characterReferenceFeet); | 
				
			||||
 | 
					            stuff2observe.Add(characterReferenceHead); | 
				
			||||
 | 
					            stuff2observe.Add(characterReferenceRoot); | 
				
			||||
 | 
					            Transform observationJoint = stuff2observe.FirstOrDefault(x => x.name == namebase); | 
				
			||||
 | 
					            if (observationJoint == null) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                 continue; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            IgnoreColliderForObservation ig = c.GetComponent<IgnoreColliderForObservation>(); | 
				
			||||
 | 
					            if (ig != null) | 
				
			||||
 | 
					                DestroyImmediate(ig); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //I add reference to the ragdoll, the articulationBodyRoot:
 | 
				
			||||
 | 
					        target.ArticulationBodyRoot = root.GetComponent<ArticulationBody>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach (var articulationBody in root.GetComponentsInChildren<ArticulationBody>()) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            var overlap = articulationBody.gameObject.AddComponent<HandleOverlap>(); | 
				
			||||
 | 
					            overlap.Parent = target.ArticulationBodyRoot.gameObject; | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //at this stage, every single articulatedBody is root. Check it out with the script below
 | 
				
			||||
 | 
					        /* | 
				
			||||
 | 
					        foreach (Transform j in joints) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					            ArticulationBody ab = j.transform.GetComponent<ArticulationBody>(); | 
				
			||||
 | 
					            if (ab.isRoot) | 
				
			||||
 | 
					            { | 
				
			||||
 | 
					                Debug.Log(ab.name + "is root "); | 
				
			||||
 | 
					            } | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        */ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ProcRagdollAgent _ragdoll4training = temp.AddComponent<ProcRagdollAgent>(); | 
				
			||||
 | 
					        //      _ragdoll4training.transform.parent = trainingenv.transform;
 | 
				
			||||
 | 
					        //_ragdoll4training.transform.SetParent(trainingenv.transform);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _ragdoll4training.CameraTarget = root; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // add the muscles. WE DID EARLIER
 | 
				
			||||
 | 
					        //generateMuscles();
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // center the articulationBody masses:
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        muscleteam.CenterABMasses(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        // choose the motor update mode
 | 
				
			||||
 | 
					        //muscleteam.MotorUpdateMode = Muscles.MotorMode.PDopenloop;
 | 
				
			||||
 | 
					        muscleteam.MotorUpdateMode = Muscles.MotorMode.PD; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return _ragdoll4training; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void addSensorsInFeet(Transform root) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //I add the sensors in the feet:
 | 
				
			||||
 | 
					        Transform[] pack2 = root.GetComponentsInChildren<Transform>(); | 
				
			||||
 | 
					        foreach (Transform t in characterReferenceFeet) | 
				
			||||
 | 
					        { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Transform footDadRef = t.parent; | 
				
			||||
 | 
					            Transform footDad = pack2.First<Transform>(x => x.name == "articulation:" + footDadRef.name); | 
				
			||||
 | 
					            Collider[] footColliders = footDad.GetComponentsInChildren<Collider>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Transform foot = pack2.First<Transform>(x => x.name == "articulation:" + t.name); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            // the sensor is based on the collider
 | 
				
			||||
 | 
					            //Collider[] footColliders = foot.GetComponentsInChildren<Collider>();
 | 
				
			||||
 | 
					            Collider footCollider = footColliders.First<Collider>(x => x.name.Contains(t.name)); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            BoxCollider myBox = footCollider.gameObject.AddComponent<BoxCollider>(); | 
				
			||||
 | 
					            myBox.size = new Vector3(0.08f, 0.03f, 0.08f);//these is totally adjusted by hand
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            myBox.name = footCollider.name; | 
				
			||||
 | 
					            DestroyImmediate(footCollider); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            addSensor2FootCollider(myBox); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //we update the list:
 | 
				
			||||
 | 
					            footColliders = footDad.GetComponentsInChildren<Collider>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            //we also add it to its father:
 | 
				
			||||
 | 
					            Collider footColliderDad = footColliders.First<Collider>(x => x.name.Contains(footDadRef.name)); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            BoxCollider myBoxDad = footColliderDad.gameObject.AddComponent<BoxCollider>(); | 
				
			||||
 | 
					            myBoxDad.size = new Vector3(0.08f, 0.05f, 0.15f);//these is totally adjusted by hand
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            myBoxDad.transform.position = new Vector3(myBoxDad.transform.position.x, myBox.transform.position.y, myBoxDad.transform.position.z); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            myBoxDad.name = footColliderDad.name; | 
				
			||||
 | 
					            DestroyImmediate(footColliderDad); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            addSensor2FootCollider(myBoxDad); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void addSensor2FootCollider(Collider footCollider) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        GameObject sensorGameObject = GameObject.Instantiate(footCollider.gameObject); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        sensorGameObject.name = sensorGameObject.name.Replace("(Clone)", ""); | 
				
			||||
 | 
					        sensorGameObject.name += "_sensor"; | 
				
			||||
 | 
					        Collider sensor = sensorGameObject.GetComponent<Collider>(); | 
				
			||||
 | 
					        sensor.isTrigger = true; | 
				
			||||
 | 
					        // sensorGameObject.AddComponent<HandleOverlap>();
 | 
				
			||||
 | 
					        sensorGameObject.AddComponent<SensorBehavior>(); | 
				
			||||
 | 
					        sensorGameObject.transform.parent = footCollider.transform.parent; | 
				
			||||
 | 
					        sensorGameObject.transform.position = footCollider.transform.position; | 
				
			||||
 | 
					        sensorGameObject.transform.rotation = footCollider.transform.rotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //it needs to go after adding ragdollAgent or it automatically ads an Agent, which generates conflict
 | 
				
			||||
 | 
					    void addTrainingParameters(MapRagdoll2Anim target, ProcRagdollAgent temp) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        BehaviorParameters bp = temp.gameObject.GetComponent<BehaviorParameters>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        bp.BehaviorName = LearningConfigName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        DecisionRequester dr =temp.gameObject.AddComponent<DecisionRequester>(); | 
				
			||||
 | 
					        dr.DecisionPeriod = 2; | 
				
			||||
 | 
					        dr.TakeActionsBetweenDecisions = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Rewards2Learn dcrew = temp.gameObject.AddComponent<Rewards2Learn>(); | 
				
			||||
 | 
					        dcrew.headname = "articulation:" + characterReferenceHead.name; | 
				
			||||
 | 
					        dcrew.targetedRootName = "articulation:" + characterReferenceRoot.name; //it should be it's son, but let's see
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        temp.MaxStep = 2000; | 
				
			||||
 | 
					        temp.FixedDeltaTime = 0.0125f; | 
				
			||||
 | 
					        temp.RequestCamera = true; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        temp.gameObject.AddComponent<SensorObservations>(); | 
				
			||||
 | 
					        Observations2Learn dcobs = temp.gameObject.AddComponent<Observations2Learn>(); | 
				
			||||
 | 
					        dcobs.targetedRootName = characterReferenceRoot.name;  // target.ArticulationBodyRoot.name;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        dcobs.targetedRootName = "articulation:" + characterReferenceRoot.name; //it should be it's son, but let's see
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        MapRangeOfMotion2Constraints rom = temp.gameObject.AddComponent<MapRangeOfMotion2Constraints>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //used when we do not parse
 | 
				
			||||
 | 
					        rom.info2store = info2store; | 
				
			||||
 | 
					         | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void GenerateRangeOfMotionParser() { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					         | 
				
			||||
 | 
					        ROMparserSwingTwist rom = gameObject.GetComponentInChildren<ROMparserSwingTwist>(); | 
				
			||||
 | 
					        if (rom == null) { | 
				
			||||
 | 
					            GameObject go = new GameObject(); | 
				
			||||
 | 
					            go.name = "ROM-parser"; | 
				
			||||
 | 
					            go.transform.parent = gameObject.transform; | 
				
			||||
 | 
					            rom = go.AddComponent<ROMparserSwingTwist>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        rom.info2store = info2store; | 
				
			||||
 | 
					        rom.theAnimator = characterReference; | 
				
			||||
 | 
					        rom.skeletonRoot = characterReferenceRoot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        rom.targetRagdollRoot = character4synthesis.GetComponent<MapRagdoll2Anim>().ArticulationBodyRoot; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        rom.trainingEnv = _outcome; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    void generateMuscles() { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //muscles
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        foreach(ArticulationBody ab in articulatedJoints) {  | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            Muscles.MusclePower muscle = new Muscles.MusclePower(); | 
				
			||||
 | 
					            muscle.PowerVector = new Vector3(40, 40, 40); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            muscle.Muscle = ab.name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            if (muscleteam.MusclePowers == null) | 
				
			||||
 | 
					                muscleteam.MusclePowers = new List<Muscles.MusclePower>(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					            muscleteam.MusclePowers.Add(muscle); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					       | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void Prepare4RangeOfMotionParsing() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        _outcome.gameObject.SetActive(false); | 
				
			||||
 | 
					        characterReference.gameObject.SetActive(true); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void Prepare4EnvironmentStorage() | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        characterReference.gameObject.SetActive(false); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        _outcome.gameObject.SetActive(true); | 
				
			||||
 | 
					       | 
				
			||||
 | 
					       // RagDollAgent ra = _outcome.GetComponentInChildren<RagDollAgent>(true);
 | 
				
			||||
 | 
					       // ra.gameObject.SetActive(true);
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public void ApplyROMasConstraintsAndConfigure() { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        MapRangeOfMotion2Constraints ROMonRagdoll = Outcome.GetComponentInChildren<MapRangeOfMotion2Constraints>(true); | 
				
			||||
 | 
					        //ROMonRagdoll.MinROMNeededForJoint = MinROMNeededForJoint;
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (ROMonRagdoll.info2store == null) { | 
				
			||||
 | 
					            ROMonRagdoll.info2store = this.info2store; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ROMonRagdoll.ConfigureTrainingForRagdoll(MinROMNeededForJoint); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					         | 
				
			||||
 | 
					        generateMuscles(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ROMonRagdoll.GetComponent<DecisionRequester>().DecisionPeriod = 2; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ROMonRagdoll.gameObject.SetActive(true);  | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 1898a29c838a8f445af23e017c73e97a | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,132 @@ | 
				
			|||||
 | 
					using System.Collections; | 
				
			||||
 | 
					using System.Collections.Generic; | 
				
			||||
 | 
					using UnityEngine; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					public static class Utils  | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    // Find angular velocity. The delta rotation is converted to radians within [-pi, +pi].
 | 
				
			||||
 | 
					    // Vector3 OldGetAngularVelocity(Quaternion from, Quaternion to, float timeDelta)
 | 
				
			||||
 | 
					    // {
 | 
				
			||||
 | 
					    //     var rotationVelocity = FromToRotation(from, to);
 | 
				
			||||
 | 
					    //     var angularVelocityInDeg = NormalizedEulerAngles(rotationVelocity.eulerAngles) / timeDelta;
 | 
				
			||||
 | 
					    //     var angularVelocity = angularVelocityInDeg * Mathf.Deg2Rad;
 | 
				
			||||
 | 
					    //     return angularVelocity;
 | 
				
			||||
 | 
					    // }
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public static Vector3 GetAngularVelocity(Quaternion from, Quaternion to, float timeDelta = 1f) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Vector3 fromInDeg = Utils.GetSwingTwist(from); | 
				
			||||
 | 
					        Vector3 toInDeg = Utils.GetSwingTwist(to); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return AngularVelocityInReducedCoordinates(fromInDeg, toInDeg, timeDelta); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    //you can also use this to calculate acceleration, right?
 | 
				
			||||
 | 
					    public static Vector3 AngularVelocityInReducedCoordinates(Vector3 fromIn, Vector3 toIn, float timeDelta = 1f) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Vector3 diff = (fromIn - toIn)*Mathf.Deg2Rad; | 
				
			||||
 | 
					        Vector3 angularVelocity = diff / timeDelta; | 
				
			||||
 | 
					        return angularVelocity; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public static Vector3 GetSwingTwist(Quaternion localRotation)  | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Quaternion a = new Quaternion(); | 
				
			||||
 | 
					        Quaternion b = new Quaternion(); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return GetSwingTwist(localRotation, out a, out b); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public static Vector3 GetSwingTwist(Quaternion localRotation, out Quaternion swing, out Quaternion twist) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //the decomposition in swing-twist, typically works like this:
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        swing = new Quaternion(0.0f, localRotation.y, localRotation.z, localRotation.w); | 
				
			||||
 | 
					        swing = swing.normalized; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //Twist: assuming   q_localRotation = q_swing * q_twist 
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        twist = Quaternion.Inverse(swing) * localRotation; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //double check:
 | 
				
			||||
 | 
					        Quaternion temp = swing * twist; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        bool isTheSame = (Mathf.Abs(Quaternion.Angle(temp, localRotation)) < 0.001f); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (!isTheSame) | 
				
			||||
 | 
					            Debug.LogError("I have: " + temp + "which does not match: " + localRotation + "because their angle is: " + Quaternion.Angle(temp, localRotation)); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        Vector3 InReducedCoord = new Vector3(twist.eulerAngles.x, swing.eulerAngles.y, swing.eulerAngles.z);            //this is consistent with how the values are stored in ArticulationBody:
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        //we make sure we keep the values nearest to 0 (with a modulus)
 | 
				
			||||
 | 
					        if (Mathf.Abs(InReducedCoord.x - 360) < Mathf.Abs(InReducedCoord.x)) | 
				
			||||
 | 
					            InReducedCoord.x = (InReducedCoord.x - 360); | 
				
			||||
 | 
					        if (Mathf.Abs(InReducedCoord.y - 360) < Mathf.Abs(InReducedCoord.y)) | 
				
			||||
 | 
					            InReducedCoord.y = (InReducedCoord.y - 360); | 
				
			||||
 | 
					        if (Mathf.Abs(InReducedCoord.z - 360) < Mathf.Abs(InReducedCoord.z)) | 
				
			||||
 | 
					            InReducedCoord.z = (InReducedCoord.z - 360); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return InReducedCoord; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public static ArticulationReducedSpace GetReducedSpaceFromTargetVector3(Vector3 target) { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        ArticulationReducedSpace ars = new ArticulationReducedSpace(); | 
				
			||||
 | 
					        ars.dofCount = 3; | 
				
			||||
 | 
					        ars[0] = target.x; | 
				
			||||
 | 
					        ars[1] = target.y; | 
				
			||||
 | 
					        ars[2] = target.z; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return ars; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    public static Vector3 GetArticulationReducedSpaceInVector3(ArticulationReducedSpace ars) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        Vector3 result = Vector3.zero;// new Vector3();
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        if (ars.dofCount > 0) | 
				
			||||
 | 
					            result.x = ars[0]; | 
				
			||||
 | 
					        if (ars.dofCount > 1) | 
				
			||||
 | 
					            result.y = ars[1]; | 
				
			||||
 | 
					        if (ars.dofCount > 2) | 
				
			||||
 | 
					            result.z = ars[2]; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return result; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					    // Return rotation from one rotation to another
 | 
				
			||||
 | 
					    public static Quaternion FromToRotation(Quaternion from, Quaternion to) | 
				
			||||
 | 
					    { | 
				
			||||
 | 
					        if (to == from) return Quaternion.identity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					        return to * Quaternion.Inverse(from); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,11 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: b67d65de35f2748819254ca104721cac | 
				
			||||
 | 
					MonoImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  defaultReferences: [] | 
				
			||||
 | 
					  executionOrder: 0 | 
				
			||||
 | 
					  icon: {instanceID: 0} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 44d80858b3698f643b3645028b1d9f6b | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 73fe48d040d7678408c5ec479120ef9f | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: adefb1536f25634478a6f7b9819d02de | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 6709a25fd276d6a42885e29ad59a2183 | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									
										File diff suppressed because it is too large
									
								
							
						
					@ -0,0 +1,7 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: c4813c0eb838d1b4fa513c76f6b99f5f | 
				
			||||
 | 
					PrefabImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									
										File diff suppressed because it is too large
									
								
							
						
					@ -0,0 +1,7 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 0db68a8912718904d967ab56e13a1785 | 
				
			||||
 | 
					PrefabImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,135 @@ | 
				
			|||||
 | 
					%YAML 1.1 | 
				
			||||
 | 
					%TAG !u! tag:unity3d.com,2011: | 
				
			||||
 | 
					--- !u!114 &-3821349114274997365 | 
				
			||||
 | 
					MonoBehaviour: | 
				
			||||
 | 
					  m_ObjectHideFlags: 11 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_GameObject: {fileID: 0} | 
				
			||||
 | 
					  m_Enabled: 1 | 
				
			||||
 | 
					  m_EditorHideFlags: 0 | 
				
			||||
 | 
					  m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | 
				
			||||
 | 
					  m_Name:  | 
				
			||||
 | 
					  m_EditorClassIdentifier:  | 
				
			||||
 | 
					  version: 7 | 
				
			||||
 | 
					--- !u!21 &2100000 | 
				
			||||
 | 
					Material: | 
				
			||||
 | 
					  serializedVersion: 8 | 
				
			||||
 | 
					  m_ObjectHideFlags: 0 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_Name: BlueJoints | 
				
			||||
 | 
					  m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} | 
				
			||||
 | 
					  m_Parent: {fileID: 0} | 
				
			||||
 | 
					  m_ModifiedSerializedProperties: 0 | 
				
			||||
 | 
					  m_ValidKeywords: [] | 
				
			||||
 | 
					  m_InvalidKeywords: [] | 
				
			||||
 | 
					  m_LightmapFlags: 4 | 
				
			||||
 | 
					  m_EnableInstancingVariants: 0 | 
				
			||||
 | 
					  m_DoubleSidedGI: 0 | 
				
			||||
 | 
					  m_CustomRenderQueue: -1 | 
				
			||||
 | 
					  stringTagMap: | 
				
			||||
 | 
					    RenderType: Opaque | 
				
			||||
 | 
					  disabledShaderPasses: [] | 
				
			||||
 | 
					  m_LockedProperties:  | 
				
			||||
 | 
					  m_SavedProperties: | 
				
			||||
 | 
					    serializedVersion: 3 | 
				
			||||
 | 
					    m_TexEnvs: | 
				
			||||
 | 
					    - _BaseMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _BumpMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailAlbedoMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailMask: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailNormalMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _EmissionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MainTex: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MetallicGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _OcclusionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _ParallaxMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _SpecGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_Lightmaps: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_LightmapsInd: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_ShadowMasks: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    m_Ints: [] | 
				
			||||
 | 
					    m_Floats: | 
				
			||||
 | 
					    - _AlphaClip: 0 | 
				
			||||
 | 
					    - _AlphaToMask: 0 | 
				
			||||
 | 
					    - _Blend: 0 | 
				
			||||
 | 
					    - _BlendModePreserveSpecular: 1 | 
				
			||||
 | 
					    - _BumpScale: 1 | 
				
			||||
 | 
					    - _ClearCoatMask: 0 | 
				
			||||
 | 
					    - _ClearCoatSmoothness: 0 | 
				
			||||
 | 
					    - _Cull: 2 | 
				
			||||
 | 
					    - _Cutoff: 0.5 | 
				
			||||
 | 
					    - _DetailAlbedoMapScale: 1 | 
				
			||||
 | 
					    - _DetailNormalMapScale: 1 | 
				
			||||
 | 
					    - _DstBlend: 0 | 
				
			||||
 | 
					    - _DstBlendAlpha: 0 | 
				
			||||
 | 
					    - _EnvironmentReflections: 1 | 
				
			||||
 | 
					    - _GlossMapScale: 1 | 
				
			||||
 | 
					    - _Glossiness: 0.5 | 
				
			||||
 | 
					    - _GlossyReflections: 1 | 
				
			||||
 | 
					    - _Metallic: 0 | 
				
			||||
 | 
					    - _Mode: 0 | 
				
			||||
 | 
					    - _OcclusionStrength: 1 | 
				
			||||
 | 
					    - _Parallax: 0.02 | 
				
			||||
 | 
					    - _QueueOffset: 0 | 
				
			||||
 | 
					    - _ReceiveShadows: 1 | 
				
			||||
 | 
					    - _Smoothness: 0.5 | 
				
			||||
 | 
					    - _SmoothnessTextureChannel: 0 | 
				
			||||
 | 
					    - _SpecularHighlights: 1 | 
				
			||||
 | 
					    - _SrcBlend: 1 | 
				
			||||
 | 
					    - _SrcBlendAlpha: 1 | 
				
			||||
 | 
					    - _Surface: 0 | 
				
			||||
 | 
					    - _UVSec: 0 | 
				
			||||
 | 
					    - _WorkflowMode: 1 | 
				
			||||
 | 
					    - _ZWrite: 1 | 
				
			||||
 | 
					    m_Colors: | 
				
			||||
 | 
					    - _BaseColor: {r: 0, g: 0.58620685, b: 1, a: 1} | 
				
			||||
 | 
					    - _Color: {r: 0, g: 0.58620685, b: 1, a: 1} | 
				
			||||
 | 
					    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | 
				
			||||
 | 
					    - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | 
				
			||||
 | 
					  m_BuildTextureStacks: [] | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 4f5046ec1d1fb3d4696fd5f2f91b12d7 | 
				
			||||
 | 
					NativeFormatImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  mainObjectFileID: 0 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,135 @@ | 
				
			|||||
 | 
					%YAML 1.1 | 
				
			||||
 | 
					%TAG !u! tag:unity3d.com,2011: | 
				
			||||
 | 
					--- !u!114 &-6923165206544234797 | 
				
			||||
 | 
					MonoBehaviour: | 
				
			||||
 | 
					  m_ObjectHideFlags: 11 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_GameObject: {fileID: 0} | 
				
			||||
 | 
					  m_Enabled: 1 | 
				
			||||
 | 
					  m_EditorHideFlags: 0 | 
				
			||||
 | 
					  m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | 
				
			||||
 | 
					  m_Name:  | 
				
			||||
 | 
					  m_EditorClassIdentifier:  | 
				
			||||
 | 
					  version: 7 | 
				
			||||
 | 
					--- !u!21 &2100000 | 
				
			||||
 | 
					Material: | 
				
			||||
 | 
					  serializedVersion: 8 | 
				
			||||
 | 
					  m_ObjectHideFlags: 0 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_Name: BlueSurface | 
				
			||||
 | 
					  m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} | 
				
			||||
 | 
					  m_Parent: {fileID: 0} | 
				
			||||
 | 
					  m_ModifiedSerializedProperties: 0 | 
				
			||||
 | 
					  m_ValidKeywords: [] | 
				
			||||
 | 
					  m_InvalidKeywords: [] | 
				
			||||
 | 
					  m_LightmapFlags: 4 | 
				
			||||
 | 
					  m_EnableInstancingVariants: 0 | 
				
			||||
 | 
					  m_DoubleSidedGI: 0 | 
				
			||||
 | 
					  m_CustomRenderQueue: -1 | 
				
			||||
 | 
					  stringTagMap: | 
				
			||||
 | 
					    RenderType: Opaque | 
				
			||||
 | 
					  disabledShaderPasses: [] | 
				
			||||
 | 
					  m_LockedProperties:  | 
				
			||||
 | 
					  m_SavedProperties: | 
				
			||||
 | 
					    serializedVersion: 3 | 
				
			||||
 | 
					    m_TexEnvs: | 
				
			||||
 | 
					    - _BaseMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _BumpMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailAlbedoMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailMask: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailNormalMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _EmissionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MainTex: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MetallicGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _OcclusionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _ParallaxMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _SpecGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_Lightmaps: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_LightmapsInd: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_ShadowMasks: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    m_Ints: [] | 
				
			||||
 | 
					    m_Floats: | 
				
			||||
 | 
					    - _AlphaClip: 0 | 
				
			||||
 | 
					    - _AlphaToMask: 0 | 
				
			||||
 | 
					    - _Blend: 0 | 
				
			||||
 | 
					    - _BlendModePreserveSpecular: 1 | 
				
			||||
 | 
					    - _BumpScale: 1 | 
				
			||||
 | 
					    - _ClearCoatMask: 0 | 
				
			||||
 | 
					    - _ClearCoatSmoothness: 0 | 
				
			||||
 | 
					    - _Cull: 2 | 
				
			||||
 | 
					    - _Cutoff: 0.5 | 
				
			||||
 | 
					    - _DetailAlbedoMapScale: 1 | 
				
			||||
 | 
					    - _DetailNormalMapScale: 1 | 
				
			||||
 | 
					    - _DstBlend: 0 | 
				
			||||
 | 
					    - _DstBlendAlpha: 0 | 
				
			||||
 | 
					    - _EnvironmentReflections: 1 | 
				
			||||
 | 
					    - _GlossMapScale: 1 | 
				
			||||
 | 
					    - _Glossiness: 0.5 | 
				
			||||
 | 
					    - _GlossyReflections: 1 | 
				
			||||
 | 
					    - _Metallic: 0 | 
				
			||||
 | 
					    - _Mode: 0 | 
				
			||||
 | 
					    - _OcclusionStrength: 1 | 
				
			||||
 | 
					    - _Parallax: 0.02 | 
				
			||||
 | 
					    - _QueueOffset: 0 | 
				
			||||
 | 
					    - _ReceiveShadows: 1 | 
				
			||||
 | 
					    - _Smoothness: 0.5 | 
				
			||||
 | 
					    - _SmoothnessTextureChannel: 0 | 
				
			||||
 | 
					    - _SpecularHighlights: 1 | 
				
			||||
 | 
					    - _SrcBlend: 1 | 
				
			||||
 | 
					    - _SrcBlendAlpha: 1 | 
				
			||||
 | 
					    - _Surface: 0 | 
				
			||||
 | 
					    - _UVSec: 0 | 
				
			||||
 | 
					    - _WorkflowMode: 1 | 
				
			||||
 | 
					    - _ZWrite: 1 | 
				
			||||
 | 
					    m_Colors: | 
				
			||||
 | 
					    - _BaseColor: {r: 0, g: 0.42068955, b: 1, a: 1} | 
				
			||||
 | 
					    - _Color: {r: 0, g: 0.42068952, b: 1, a: 1} | 
				
			||||
 | 
					    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | 
				
			||||
 | 
					    - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | 
				
			||||
 | 
					  m_BuildTextureStacks: [] | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 2357ec65c9eceb94a98f3916931656d0 | 
				
			||||
 | 
					NativeFormatImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  mainObjectFileID: 0 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									Binary file not shown.
								
							
						
					@ -0,0 +1,896 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: d67d76a0f1d165e439c33842a4e6d829 | 
				
			||||
 | 
					ModelImporter: | 
				
			||||
 | 
					  serializedVersion: 20101 | 
				
			||||
 | 
					  internalIDToNameTable: | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      74: -203655887218126122 | 
				
			||||
 | 
					    second: mixamo.com | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  materials: | 
				
			||||
 | 
					    materialImportMode: 1 | 
				
			||||
 | 
					    materialName: 0 | 
				
			||||
 | 
					    materialSearch: 1 | 
				
			||||
 | 
					    materialLocation: 1 | 
				
			||||
 | 
					  animations: | 
				
			||||
 | 
					    legacyGenerateAnimations: 4 | 
				
			||||
 | 
					    bakeSimulation: 0 | 
				
			||||
 | 
					    resampleCurves: 1 | 
				
			||||
 | 
					    optimizeGameObjects: 0 | 
				
			||||
 | 
					    motionNodeName:  | 
				
			||||
 | 
					    rigImportErrors:  | 
				
			||||
 | 
					    rigImportWarnings:  | 
				
			||||
 | 
					    animationImportErrors:  | 
				
			||||
 | 
					    animationImportWarnings:  | 
				
			||||
 | 
					    animationRetargetingWarnings:  | 
				
			||||
 | 
					    animationDoRetargetingWarnings: 0 | 
				
			||||
 | 
					    importAnimatedCustomProperties: 0 | 
				
			||||
 | 
					    importConstraints: 0 | 
				
			||||
 | 
					    animationCompression: 3 | 
				
			||||
 | 
					    animationRotationError: 0.5 | 
				
			||||
 | 
					    animationPositionError: 0.5 | 
				
			||||
 | 
					    animationScaleError: 0.5 | 
				
			||||
 | 
					    animationWrapMode: 0 | 
				
			||||
 | 
					    extraExposedTransformPaths: [] | 
				
			||||
 | 
					    extraUserProperties: [] | 
				
			||||
 | 
					    clipAnimations: [] | 
				
			||||
 | 
					    isReadable: 0 | 
				
			||||
 | 
					  meshes: | 
				
			||||
 | 
					    lODScreenPercentages: [] | 
				
			||||
 | 
					    globalScale: 1 | 
				
			||||
 | 
					    meshCompression: 0 | 
				
			||||
 | 
					    addColliders: 0 | 
				
			||||
 | 
					    useSRGBMaterialColor: 1 | 
				
			||||
 | 
					    sortHierarchyByName: 1 | 
				
			||||
 | 
					    importVisibility: 1 | 
				
			||||
 | 
					    importBlendShapes: 1 | 
				
			||||
 | 
					    importCameras: 1 | 
				
			||||
 | 
					    importLights: 1 | 
				
			||||
 | 
					    fileIdsGeneration: 2 | 
				
			||||
 | 
					    swapUVChannels: 0 | 
				
			||||
 | 
					    generateSecondaryUV: 0 | 
				
			||||
 | 
					    useFileUnits: 1 | 
				
			||||
 | 
					    keepQuads: 0 | 
				
			||||
 | 
					    weldVertices: 1 | 
				
			||||
 | 
					    bakeAxisConversion: 0 | 
				
			||||
 | 
					    preserveHierarchy: 0 | 
				
			||||
 | 
					    skinWeightsMode: 0 | 
				
			||||
 | 
					    maxBonesPerVertex: 4 | 
				
			||||
 | 
					    minBoneWeight: 0.001 | 
				
			||||
 | 
					    meshOptimizationFlags: -1 | 
				
			||||
 | 
					    indexFormat: 0 | 
				
			||||
 | 
					    secondaryUVAngleDistortion: 8 | 
				
			||||
 | 
					    secondaryUVAreaDistortion: 15.000001 | 
				
			||||
 | 
					    secondaryUVHardAngle: 88 | 
				
			||||
 | 
					    secondaryUVMarginMethod: 1 | 
				
			||||
 | 
					    secondaryUVMinLightmapResolution: 40 | 
				
			||||
 | 
					    secondaryUVMinObjectScale: 1 | 
				
			||||
 | 
					    secondaryUVPackMargin: 4 | 
				
			||||
 | 
					    useFileScale: 1 | 
				
			||||
 | 
					  tangentSpace: | 
				
			||||
 | 
					    normalSmoothAngle: 60 | 
				
			||||
 | 
					    normalImportMode: 0 | 
				
			||||
 | 
					    tangentImportMode: 3 | 
				
			||||
 | 
					    normalCalculationMode: 4 | 
				
			||||
 | 
					    legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 | 
				
			||||
 | 
					    blendShapeNormalImportMode: 1 | 
				
			||||
 | 
					    normalSmoothingSource: 0 | 
				
			||||
 | 
					  referencedClips: [] | 
				
			||||
 | 
					  importAnimation: 0 | 
				
			||||
 | 
					  humanDescription: | 
				
			||||
 | 
					    serializedVersion: 3 | 
				
			||||
 | 
					    human: | 
				
			||||
 | 
					    - boneName: mixamorig:Hips | 
				
			||||
 | 
					      humanName: Hips | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      humanName: LeftUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      humanName: RightUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftLeg | 
				
			||||
 | 
					      humanName: LeftLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightLeg | 
				
			||||
 | 
					      humanName: RightLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftFoot | 
				
			||||
 | 
					      humanName: LeftFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightFoot | 
				
			||||
 | 
					      humanName: RightFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine | 
				
			||||
 | 
					      humanName: Spine | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine1 | 
				
			||||
 | 
					      humanName: Chest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Neck | 
				
			||||
 | 
					      humanName: Neck | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Head | 
				
			||||
 | 
					      humanName: Head | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      humanName: LeftShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightShoulder | 
				
			||||
 | 
					      humanName: RightShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftArm | 
				
			||||
 | 
					      humanName: LeftUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightArm | 
				
			||||
 | 
					      humanName: RightUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      humanName: LeftLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightForeArm | 
				
			||||
 | 
					      humanName: RightLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHand | 
				
			||||
 | 
					      humanName: LeftHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHand | 
				
			||||
 | 
					      humanName: RightHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      humanName: LeftToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightToeBase | 
				
			||||
 | 
					      humanName: RightToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandThumb1 | 
				
			||||
 | 
					      humanName: Left Thumb Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandThumb2 | 
				
			||||
 | 
					      humanName: Left Thumb Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandThumb3 | 
				
			||||
 | 
					      humanName: Left Thumb Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandIndex1 | 
				
			||||
 | 
					      humanName: Left Index Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandIndex2 | 
				
			||||
 | 
					      humanName: Left Index Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandIndex3 | 
				
			||||
 | 
					      humanName: Left Index Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandMiddle1 | 
				
			||||
 | 
					      humanName: Left Middle Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandMiddle2 | 
				
			||||
 | 
					      humanName: Left Middle Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandMiddle3 | 
				
			||||
 | 
					      humanName: Left Middle Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandRing1 | 
				
			||||
 | 
					      humanName: Left Ring Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandRing2 | 
				
			||||
 | 
					      humanName: Left Ring Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandRing3 | 
				
			||||
 | 
					      humanName: Left Ring Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandPinky1 | 
				
			||||
 | 
					      humanName: Left Little Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandPinky2 | 
				
			||||
 | 
					      humanName: Left Little Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandPinky3 | 
				
			||||
 | 
					      humanName: Left Little Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandThumb1 | 
				
			||||
 | 
					      humanName: Right Thumb Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandThumb2 | 
				
			||||
 | 
					      humanName: Right Thumb Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandThumb3 | 
				
			||||
 | 
					      humanName: Right Thumb Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandIndex1 | 
				
			||||
 | 
					      humanName: Right Index Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandIndex2 | 
				
			||||
 | 
					      humanName: Right Index Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandIndex3 | 
				
			||||
 | 
					      humanName: Right Index Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandMiddle1 | 
				
			||||
 | 
					      humanName: Right Middle Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandMiddle2 | 
				
			||||
 | 
					      humanName: Right Middle Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandMiddle3 | 
				
			||||
 | 
					      humanName: Right Middle Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandRing1 | 
				
			||||
 | 
					      humanName: Right Ring Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandRing2 | 
				
			||||
 | 
					      humanName: Right Ring Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandRing3 | 
				
			||||
 | 
					      humanName: Right Ring Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandPinky1 | 
				
			||||
 | 
					      humanName: Right Little Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandPinky2 | 
				
			||||
 | 
					      humanName: Right Little Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandPinky3 | 
				
			||||
 | 
					      humanName: Right Little Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine2 | 
				
			||||
 | 
					      humanName: UpperChest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    skeleton: | 
				
			||||
 | 
					    - name: Idle(Clone) | 
				
			||||
 | 
					      parentName:  | 
				
			||||
 | 
					      position: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: 0, z: 0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: Beta_Joints | 
				
			||||
 | 
					      parentName: Idle(Clone) | 
				
			||||
 | 
					      position: {x: -0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: Beta_Surface | 
				
			||||
 | 
					      parentName: Idle(Clone) | 
				
			||||
 | 
					      position: {x: -0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Hips | 
				
			||||
 | 
					      parentName: Idle(Clone) | 
				
			||||
 | 
					      position: {x: -0.004121775, y: 1.0720447, z: 0.020950764} | 
				
			||||
 | 
					      rotation: {x: -0, y: -0, z: -0.000000013460522, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.00000009234152, y: 0.10181588, z: 0.0013152092} | 
				
			||||
 | 
					      rotation: {x: -0.000000005820766, y: -0.0000000029103835, z: 0.000000013096724, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine1 | 
				
			||||
 | 
					      parentName: mixamorig:Spine | 
				
			||||
 | 
					      position: {x: -0.000000002519403, y: 0.10083451, z: -0.010008043} | 
				
			||||
 | 
					      rotation: {x: 0.000000005820766, y: 0.0000000029103835, z: 1.8189894e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine2 | 
				
			||||
 | 
					      parentName: mixamorig:Spine1 | 
				
			||||
 | 
					      position: {x: -0.0000000034574863, y: 0.09100011, z: -0.013734171} | 
				
			||||
 | 
					      rotation: {x: -0.000000002910383, y: 0.000000002910383, z: -0.0000000018189894, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 0.99999994, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Neck | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: -0.0000000063342855, y: 0.16671668, z: -0.025161678} | 
				
			||||
 | 
					      rotation: {x: 0.0000000021827873, y: -0.000000002910383, z: 0.0000000017507773, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.9999999, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Head | 
				
			||||
 | 
					      parentName: mixamorig:Neck | 
				
			||||
 | 
					      position: {x: 0.0000000042423185, y: 0.09617875, z: 0.016850075} | 
				
			||||
 | 
					      rotation: {x: 7.2759576e-10, y: -0, z: 0.0000000017053026, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.99999994, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:HeadTop_End | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: 0.0000000065082415, y: 0.17815155, z: 0.025849855} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftEye | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: -0.030675607, y: 0.06409507, z: 0.09283554} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightEye | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: 0.030675504, y: 0.064095, z: 0.09283547} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: -0.045704465, y: 0.10945985, z: -0.02627988} | 
				
			||||
 | 
					      rotation: {x: 0.0000000043655746, y: -0.000000002910383, z: -9.094947e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.99999994, z: 0.99999994} | 
				
			||||
 | 
					    - name: mixamorig:LeftArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      position: {x: -0.1059237, y: -0.005245829, z: -0.0223212} | 
				
			||||
 | 
					      rotation: {x: -0.0000000014551915, y: 0.0000000014551915, z: 0.000000008367351, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftForeArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftArm | 
				
			||||
 | 
					      position: {x: -0.2784152, y: -0.0000008942865, z: 0.0000003745891} | 
				
			||||
 | 
					      rotation: {x: -0.0000000014551915, y: -0.0000000014551915, z: -0.000000003274181, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000004, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHand | 
				
			||||
 | 
					      parentName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      position: {x: -0.2832884, y: -0.00000017440718, z: 0.00000037804523} | 
				
			||||
 | 
					      rotation: {x: 0.0000000014551915, y: -0, z: -0.0000000021827873, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandThumb1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.024661401, y: -0.015750492, z: 0.026824135} | 
				
			||||
 | 
					      rotation: {x: -0.11863639, y: 0.08685272, z: -0.118636325, w: 0.9819916} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandThumb2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandThumb1 | 
				
			||||
 | 
					      position: {x: -0.032298036, y: -0.018646907, z: 0.018646812} | 
				
			||||
 | 
					      rotation: {x: 0.000000029103827, y: -0.000000005820766, z: 0.000000014551915, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandThumb3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandThumb2 | 
				
			||||
 | 
					      position: {x: -0.02652565, y: -0.015314929, z: 0.015314716} | 
				
			||||
 | 
					      rotation: {x: -0.00000003201421, y: -0.0000000058207643, z: -0.000000029831426, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandThumb4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandThumb3 | 
				
			||||
 | 
					      position: {x: -0.019545669, y: -0.0112850005, z: 0.011284921} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandIndex1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.09109301, y: -0.005170834, z: 0.02260073} | 
				
			||||
 | 
					      rotation: {x: -0.000000011641532, y: -0.00000001164153, z: 1.6940656e-17, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandIndex2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandIndex1 | 
				
			||||
 | 
					      position: {x: -0.036764093, y: -0.00000006939138, z: 0.00000029242517} | 
				
			||||
 | 
					      rotation: {x: -0.000000011641532, y: 0.0000000116415295, z: 0.000000011641532, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000005, y: 1.0000004, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandIndex3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandIndex2 | 
				
			||||
 | 
					      position: {x: -0.028830625, y: 0.00000038511968, z: -0.00000042764816} | 
				
			||||
 | 
					      rotation: {x: -0, y: 0.000000005820767, z: -0.000000029103829, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000005, y: 1.0000004, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandIndex4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandIndex3 | 
				
			||||
 | 
					      position: {x: -0.023927199, y: 0.00000037025907, z: 0.00000033554434} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandMiddle1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.095334016, y: -0.00000033924047, z: 0.00000013937026} | 
				
			||||
 | 
					      rotation: {x: 0.000000011641534, y: 0.000000011641534, z: -1.6940662e-17, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandMiddle2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandMiddle1 | 
				
			||||
 | 
					      position: {x: -0.036982365, y: 0.00000001961359, z: 0.00000017916967} | 
				
			||||
 | 
					      rotation: {x: -1.7763568e-15, y: -0.000000011641534, z: 0.000000005820766, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandMiddle3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandMiddle2 | 
				
			||||
 | 
					      position: {x: -0.029509215, y: -0.00000039376084, z: 0.0000001644796} | 
				
			||||
 | 
					      rotation: {x: -0.000000011641532, y: 0.0000000058207656, z: -0.000000014551915, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000004, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandMiddle4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandMiddle3 | 
				
			||||
 | 
					      position: {x: -0.028339025, y: -0.0000003893482, z: -0.00000009504223} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandRing1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.091045275, y: -0.00043939505, z: -0.018650847} | 
				
			||||
 | 
					      rotation: {x: -3.330669e-16, y: 0.0000000349246, z: -0.000000005820767, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandRing2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandRing1 | 
				
			||||
 | 
					      position: {x: -0.031540267, y: -0.00000006553468, z: 0.00000010425744} | 
				
			||||
 | 
					      rotation: {x: 0.000000023283068, y: -0.000000029103834, z: 0.000000005820768, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandRing3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandRing2 | 
				
			||||
 | 
					      position: {x: -0.029376723, y: -0.00000045458617, z: -0.00000006864757} | 
				
			||||
 | 
					      rotation: {x: -0.000000046566132, y: 0.000000010186342, z: 0.00000003274181, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandRing4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandRing3 | 
				
			||||
 | 
					      position: {x: -0.026474526, y: -0.00000049804413, z: 7.0705153e-10} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandPinky1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.08077778, y: -0.004886682, z: -0.03806067} | 
				
			||||
 | 
					      rotation: {x: 0.00000002328306, y: 0.000000011641532, z: -1.6940659e-17, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandPinky2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandPinky1 | 
				
			||||
 | 
					      position: {x: -0.036000345, y: -0.000000022522151, z: -0.00000026238794} | 
				
			||||
 | 
					      rotation: {x: 3.5527137e-15, y: 0.000000005820768, z: -0.0000000029103842, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000004, y: 1.0000004, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandPinky3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandPinky2 | 
				
			||||
 | 
					      position: {x: -0.021142116, y: 0.00000019538281, z: -0.00000002864415} | 
				
			||||
 | 
					      rotation: {x: -0.000000023283064, y: -0.000000020372685, z: -0.000000017462298, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000005, y: 1.0000005, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandPinky4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandPinky3 | 
				
			||||
 | 
					      position: {x: -0.019756826, y: 0.00000012405657, z: -0.00000044301405} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: 0.045699697, y: 0.10946176, z: -0.026280174} | 
				
			||||
 | 
					      rotation: {x: 4.440892e-16, y: -0.0000000043655746, z: -0.000000005638867, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 0.99999994, z: 0.99999994} | 
				
			||||
 | 
					    - name: mixamorig:RightArm | 
				
			||||
 | 
					      parentName: mixamorig:RightShoulder | 
				
			||||
 | 
					      position: {x: 0.105928436, y: -0.0052479836, z: -0.022320986} | 
				
			||||
 | 
					      rotation: {x: 0.0000000029103826, y: 0.0000000043655746, z: 0.0000000136424205, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1.0000004, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:RightForeArm | 
				
			||||
 | 
					      parentName: mixamorig:RightArm | 
				
			||||
 | 
					      position: {x: 0.2784152, y: -0.00000033079218, z: 0.000000116763104} | 
				
			||||
 | 
					      rotation: {x: -0.0000000029103826, y: 0.000000032014214, z: -1.8189905e-10, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:RightHand | 
				
			||||
 | 
					      parentName: mixamorig:RightForeArm | 
				
			||||
 | 
					      position: {x: 0.2832884, y: -0.0000000015814171, z: 0.00000055816014} | 
				
			||||
 | 
					      rotation: {x: 0.0000000145519135, y: -0.00000006984919, z: -0.0000000058207656, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandPinky1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.080766745, y: -0.0048845927, z: -0.038060103} | 
				
			||||
 | 
					      rotation: {x: 2.6645353e-15, y: 0.000000034924597, z: -0.000000005820767, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:RightHandPinky2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandPinky1 | 
				
			||||
 | 
					      position: {x: 0.036000345, y: 0.00000039676655, z: 0.0000005081442} | 
				
			||||
 | 
					      rotation: {x: 0.0000000116415295, y: -0.000000011641532, z: -0.000000005820766, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000006, y: 1.0000005, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandPinky3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandPinky2 | 
				
			||||
 | 
					      position: {x: 0.021142116, y: 0.00000015137925, z: 0.00000014793768} | 
				
			||||
 | 
					      rotation: {x: -0.00000006984919, y: 0.0000000029103822, z: -0.000000014551912, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 0.9999998, y: 0.99999994, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandPinky4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandPinky3 | 
				
			||||
 | 
					      position: {x: 0.019756826, y: -0.00000018521958, z: -0.000000009839841} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandRing1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.09103588, y: -0.00043914348, z: -0.018650724} | 
				
			||||
 | 
					      rotation: {x: -0.000000034924597, y: 0.000000034924597, z: 0.000000005820767, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandRing2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandRing1 | 
				
			||||
 | 
					      position: {x: 0.031540267, y: 0.00000023997296, z: 0.0000004885121} | 
				
			||||
 | 
					      rotation: {x: 0.00000004656613, y: 0.000000005820766, z: 0.0000000029103817, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandRing3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandRing2 | 
				
			||||
 | 
					      position: {x: 0.029376723, y: -0.00000041600654, z: -0.00000039660634} | 
				
			||||
 | 
					      rotation: {x: -0.000000011641529, y: -0.0000000058207665, z: -0.000000011641532, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000004, y: 1.0000004, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandRing4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandRing3 | 
				
			||||
 | 
					      position: {x: 0.026474526, y: 0.00000024608212, z: -0.000000022949234} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandMiddle1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.09532503, y: -0.00000016312302, z: 0.00000016791842} | 
				
			||||
 | 
					      rotation: {x: 1.7763568e-15, y: 0.000000023283064, z: 0.000000005820765, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandMiddle2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandMiddle1 | 
				
			||||
 | 
					      position: {x: 0.036982365, y: 0.00000015066959, z: -0.00000022545524} | 
				
			||||
 | 
					      rotation: {x: -0.000000011641532, y: 0.000000005820766, z: -0.000000017462295, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000004, y: 1.0000004, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:RightHandMiddle3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandMiddle2 | 
				
			||||
 | 
					      position: {x: 0.029509215, y: -0.000000003113245, z: -0.0000000030340255} | 
				
			||||
 | 
					      rotation: {x: -0, y: 0.000000011641532, z: 0.0000000145519135, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandMiddle4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandMiddle3 | 
				
			||||
 | 
					      position: {x: 0.028339025, y: 0.00000008053241, z: 0.00000053787704} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandIndex1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.09108281, y: -0.0051678894, z: 0.022601163} | 
				
			||||
 | 
					      rotation: {x: -0.00000001164153, y: 0.000000034924597, z: 6.4130506e-17, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandIndex2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandIndex1 | 
				
			||||
 | 
					      position: {x: 0.036764093, y: 0.00000019227156, z: 0.0000003235567} | 
				
			||||
 | 
					      rotation: {x: -0, y: -0.000000005820766, z: -0.000000011641531, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandIndex3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandIndex2 | 
				
			||||
 | 
					      position: {x: 0.028830625, y: -0.00000049601215, z: 0.00000040448975} | 
				
			||||
 | 
					      rotation: {x: -0.000000023283063, y: -0.000000001455192, z: 0.000000043655746, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:RightHandIndex4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandIndex3 | 
				
			||||
 | 
					      position: {x: 0.023927199, y: 0.000000268147, z: 0.00000028020133} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandThumb1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.024648061, y: -0.015727142, z: 0.026826264} | 
				
			||||
 | 
					      rotation: {x: -0.11863704, y: -0.086847514, z: 0.1186371, w: 0.9819919} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:RightHandThumb2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandThumb1 | 
				
			||||
 | 
					      position: {x: 0.03229772, y: -0.018647088, z: 0.018647185} | 
				
			||||
 | 
					      rotation: {x: 0.000000011641534, y: 0.000000020372681, z: -0.000000016734703, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandThumb3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandThumb2 | 
				
			||||
 | 
					      position: {x: 0.02652605, y: -0.015314492, z: 0.015314456} | 
				
			||||
 | 
					      rotation: {x: -0.000000011641534, y: 0.000000002910383, z: 0.000000016734703, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:RightHandThumb4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandThumb3 | 
				
			||||
 | 
					      position: {x: 0.019545805, y: -0.011284617, z: 0.01128507} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: 0.08207796, y: -0.06751662, z: -0.015995594} | 
				
			||||
 | 
					      rotation: {x: 0.000000005820767, y: -0.00000001164153, z: 0.000000013460522, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 0.99999994, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightLeg | 
				
			||||
 | 
					      parentName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      position: {x: -8.435572e-10, y: -0.44370535, z: 0.0028615638} | 
				
			||||
 | 
					      rotation: {x: -0.000000011641532, y: 0.00000001164153, z: 4.560602e-25, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000001, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightFoot | 
				
			||||
 | 
					      parentName: mixamorig:RightLeg | 
				
			||||
 | 
					      position: {x: -0.000000009644582, y: -0.4442773, z: -0.02983789} | 
				
			||||
 | 
					      rotation: {x: 0.000000005820765, y: 0.000000011641532, z: -1.6408316e-15, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightToeBase | 
				
			||||
 | 
					      parentName: mixamorig:RightFoot | 
				
			||||
 | 
					      position: {x: 0.00000002360438, y: -0.08728669, z: 0.107105605} | 
				
			||||
 | 
					      rotation: {x: -7.275953e-10, y: -0.000000011641532, z: 1.819007e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightToe_End | 
				
			||||
 | 
					      parentName: mixamorig:RightToeBase | 
				
			||||
 | 
					      position: {x: 0.000000020942645, y: -0.000006763694, z: 0.0927812} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.082077816, y: -0.06751714, z: -0.015995556} | 
				
			||||
 | 
					      rotation: {x: -9.529121e-18, y: 0.0000000029103826, z: 0.000000014915713, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:LeftLeg | 
				
			||||
 | 
					      parentName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      position: {x: 0.000000004110158, y: -0.44370472, z: 0.0028464263} | 
				
			||||
 | 
					      rotation: {x: -0.000000011641532, y: -0.0000000029103826, z: 0.0000000014551917, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftFoot | 
				
			||||
 | 
					      parentName: mixamorig:LeftLeg | 
				
			||||
 | 
					      position: {x: -0.0000000047163935, y: -0.44427872, z: -0.029821906} | 
				
			||||
 | 
					      rotation: {x: 0.000000011641532, y: -0, z: -0.0000000028876457, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftToeBase | 
				
			||||
 | 
					      parentName: mixamorig:LeftFoot | 
				
			||||
 | 
					      position: {x: 0.000000029609879, y: -0.087286696, z: 0.1071056} | 
				
			||||
 | 
					      rotation: {x: -0, y: 7.940934e-19, z: 6.82121e-11, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.99999994, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftToe_End | 
				
			||||
 | 
					      parentName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      position: {x: 0.000000025080618, y: -0.0000067668298, z: 0.09278136} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    armTwist: 0.5 | 
				
			||||
 | 
					    foreArmTwist: 0.5 | 
				
			||||
 | 
					    upperLegTwist: 0.5 | 
				
			||||
 | 
					    legTwist: 0.5 | 
				
			||||
 | 
					    armStretch: 0.05 | 
				
			||||
 | 
					    legStretch: 0.05 | 
				
			||||
 | 
					    feetSpacing: 0 | 
				
			||||
 | 
					    globalScale: 1 | 
				
			||||
 | 
					    rootMotionBoneName:  | 
				
			||||
 | 
					    hasTranslationDoF: 0 | 
				
			||||
 | 
					    hasExtraRoot: 1 | 
				
			||||
 | 
					    skeletonHasParents: 1 | 
				
			||||
 | 
					  lastHumanDescriptionAvatarSource: {instanceID: 0} | 
				
			||||
 | 
					  autoGenerateAvatarMappingIfUnspecified: 1 | 
				
			||||
 | 
					  animationType: 3 | 
				
			||||
 | 
					  humanoidOversampling: 1 | 
				
			||||
 | 
					  avatarSetup: 1 | 
				
			||||
 | 
					  additionalBone: 0 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									
										File diff suppressed because it is too large
									
								
							
						
					@ -0,0 +1,7 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 6a7e84e6b4b64c744857753e3e544b81 | 
				
			||||
 | 
					PrefabImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,138 @@ | 
				
			|||||
 | 
					%YAML 1.1 | 
				
			||||
 | 
					%TAG !u! tag:unity3d.com,2011: | 
				
			||||
 | 
					--- !u!114 &-2464581126296511126 | 
				
			||||
 | 
					MonoBehaviour: | 
				
			||||
 | 
					  m_ObjectHideFlags: 11 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_GameObject: {fileID: 0} | 
				
			||||
 | 
					  m_Enabled: 1 | 
				
			||||
 | 
					  m_EditorHideFlags: 0 | 
				
			||||
 | 
					  m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | 
				
			||||
 | 
					  m_Name:  | 
				
			||||
 | 
					  m_EditorClassIdentifier:  | 
				
			||||
 | 
					  version: 7 | 
				
			||||
 | 
					--- !u!21 &2100000 | 
				
			||||
 | 
					Material: | 
				
			||||
 | 
					  serializedVersion: 8 | 
				
			||||
 | 
					  m_ObjectHideFlags: 0 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_Name: RedJoints | 
				
			||||
 | 
					  m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} | 
				
			||||
 | 
					  m_Parent: {fileID: 0} | 
				
			||||
 | 
					  m_ModifiedSerializedProperties: 0 | 
				
			||||
 | 
					  m_ValidKeywords: | 
				
			||||
 | 
					  - _SURFACE_TYPE_TRANSPARENT | 
				
			||||
 | 
					  m_InvalidKeywords: [] | 
				
			||||
 | 
					  m_LightmapFlags: 4 | 
				
			||||
 | 
					  m_EnableInstancingVariants: 0 | 
				
			||||
 | 
					  m_DoubleSidedGI: 0 | 
				
			||||
 | 
					  m_CustomRenderQueue: 3000 | 
				
			||||
 | 
					  stringTagMap: | 
				
			||||
 | 
					    RenderType: Transparent | 
				
			||||
 | 
					  disabledShaderPasses: | 
				
			||||
 | 
					  - DepthOnly | 
				
			||||
 | 
					  - SHADOWCASTER | 
				
			||||
 | 
					  m_LockedProperties:  | 
				
			||||
 | 
					  m_SavedProperties: | 
				
			||||
 | 
					    serializedVersion: 3 | 
				
			||||
 | 
					    m_TexEnvs: | 
				
			||||
 | 
					    - _BaseMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _BumpMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailAlbedoMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailMask: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailNormalMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _EmissionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MainTex: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MetallicGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _OcclusionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _ParallaxMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _SpecGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_Lightmaps: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_LightmapsInd: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_ShadowMasks: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    m_Ints: [] | 
				
			||||
 | 
					    m_Floats: | 
				
			||||
 | 
					    - _AlphaClip: 0 | 
				
			||||
 | 
					    - _AlphaToMask: 0 | 
				
			||||
 | 
					    - _Blend: 1 | 
				
			||||
 | 
					    - _BlendModePreserveSpecular: 1 | 
				
			||||
 | 
					    - _BumpScale: 1 | 
				
			||||
 | 
					    - _ClearCoatMask: 0 | 
				
			||||
 | 
					    - _ClearCoatSmoothness: 0 | 
				
			||||
 | 
					    - _Cull: 2 | 
				
			||||
 | 
					    - _Cutoff: 0.5 | 
				
			||||
 | 
					    - _DetailAlbedoMapScale: 1 | 
				
			||||
 | 
					    - _DetailNormalMapScale: 1 | 
				
			||||
 | 
					    - _DstBlend: 10 | 
				
			||||
 | 
					    - _DstBlendAlpha: 10 | 
				
			||||
 | 
					    - _EnvironmentReflections: 1 | 
				
			||||
 | 
					    - _GlossMapScale: 1 | 
				
			||||
 | 
					    - _Glossiness: 0 | 
				
			||||
 | 
					    - _GlossyReflections: 1 | 
				
			||||
 | 
					    - _Metallic: 0 | 
				
			||||
 | 
					    - _Mode: 3 | 
				
			||||
 | 
					    - _OcclusionStrength: 1 | 
				
			||||
 | 
					    - _Parallax: 0.02 | 
				
			||||
 | 
					    - _QueueOffset: 0 | 
				
			||||
 | 
					    - _ReceiveShadows: 1 | 
				
			||||
 | 
					    - _Smoothness: 0 | 
				
			||||
 | 
					    - _SmoothnessTextureChannel: 0 | 
				
			||||
 | 
					    - _SpecularHighlights: 1 | 
				
			||||
 | 
					    - _SrcBlend: 1 | 
				
			||||
 | 
					    - _SrcBlendAlpha: 1 | 
				
			||||
 | 
					    - _Surface: 1 | 
				
			||||
 | 
					    - _UVSec: 0 | 
				
			||||
 | 
					    - _WorkflowMode: 1 | 
				
			||||
 | 
					    - _ZWrite: 0 | 
				
			||||
 | 
					    m_Colors: | 
				
			||||
 | 
					    - _BaseColor: {r: 0.3333333, g: 0.12452885, b: 0.101014696, a: 0.24705882} | 
				
			||||
 | 
					    - _Color: {r: 0.33333328, g: 0.12452882, b: 0.101014666, a: 0.24705882} | 
				
			||||
 | 
					    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | 
				
			||||
 | 
					    - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | 
				
			||||
 | 
					  m_BuildTextureStacks: [] | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 7c75b8d76b8c90345b5654cf72a22ec9 | 
				
			||||
 | 
					NativeFormatImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  mainObjectFileID: 2100000 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,138 @@ | 
				
			|||||
 | 
					%YAML 1.1 | 
				
			||||
 | 
					%TAG !u! tag:unity3d.com,2011: | 
				
			||||
 | 
					--- !u!21 &2100000 | 
				
			||||
 | 
					Material: | 
				
			||||
 | 
					  serializedVersion: 8 | 
				
			||||
 | 
					  m_ObjectHideFlags: 0 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_Name: RedSurface | 
				
			||||
 | 
					  m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} | 
				
			||||
 | 
					  m_Parent: {fileID: 0} | 
				
			||||
 | 
					  m_ModifiedSerializedProperties: 0 | 
				
			||||
 | 
					  m_ValidKeywords: | 
				
			||||
 | 
					  - _SURFACE_TYPE_TRANSPARENT | 
				
			||||
 | 
					  m_InvalidKeywords: [] | 
				
			||||
 | 
					  m_LightmapFlags: 4 | 
				
			||||
 | 
					  m_EnableInstancingVariants: 0 | 
				
			||||
 | 
					  m_DoubleSidedGI: 0 | 
				
			||||
 | 
					  m_CustomRenderQueue: 3000 | 
				
			||||
 | 
					  stringTagMap: | 
				
			||||
 | 
					    RenderType: Transparent | 
				
			||||
 | 
					  disabledShaderPasses: | 
				
			||||
 | 
					  - DepthOnly | 
				
			||||
 | 
					  - SHADOWCASTER | 
				
			||||
 | 
					  m_LockedProperties:  | 
				
			||||
 | 
					  m_SavedProperties: | 
				
			||||
 | 
					    serializedVersion: 3 | 
				
			||||
 | 
					    m_TexEnvs: | 
				
			||||
 | 
					    - _BaseMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _BumpMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailAlbedoMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailMask: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailNormalMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _EmissionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MainTex: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MetallicGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _OcclusionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _ParallaxMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _SpecGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_Lightmaps: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_LightmapsInd: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_ShadowMasks: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    m_Ints: [] | 
				
			||||
 | 
					    m_Floats: | 
				
			||||
 | 
					    - _AlphaClip: 0 | 
				
			||||
 | 
					    - _AlphaToMask: 0 | 
				
			||||
 | 
					    - _Blend: 1 | 
				
			||||
 | 
					    - _BlendModePreserveSpecular: 1 | 
				
			||||
 | 
					    - _BumpScale: 1 | 
				
			||||
 | 
					    - _ClearCoatMask: 0 | 
				
			||||
 | 
					    - _ClearCoatSmoothness: 0 | 
				
			||||
 | 
					    - _Cull: 2 | 
				
			||||
 | 
					    - _Cutoff: 0.5 | 
				
			||||
 | 
					    - _DetailAlbedoMapScale: 1 | 
				
			||||
 | 
					    - _DetailNormalMapScale: 1 | 
				
			||||
 | 
					    - _DstBlend: 10 | 
				
			||||
 | 
					    - _DstBlendAlpha: 10 | 
				
			||||
 | 
					    - _EnvironmentReflections: 1 | 
				
			||||
 | 
					    - _GlossMapScale: 1 | 
				
			||||
 | 
					    - _Glossiness: 0 | 
				
			||||
 | 
					    - _GlossyReflections: 1 | 
				
			||||
 | 
					    - _Metallic: 0 | 
				
			||||
 | 
					    - _Mode: 3 | 
				
			||||
 | 
					    - _OcclusionStrength: 1 | 
				
			||||
 | 
					    - _Parallax: 0.02 | 
				
			||||
 | 
					    - _QueueOffset: 0 | 
				
			||||
 | 
					    - _ReceiveShadows: 1 | 
				
			||||
 | 
					    - _Smoothness: 0 | 
				
			||||
 | 
					    - _SmoothnessTextureChannel: 0 | 
				
			||||
 | 
					    - _SpecularHighlights: 1 | 
				
			||||
 | 
					    - _SrcBlend: 1 | 
				
			||||
 | 
					    - _SrcBlendAlpha: 1 | 
				
			||||
 | 
					    - _Surface: 1 | 
				
			||||
 | 
					    - _UVSec: 0 | 
				
			||||
 | 
					    - _WorkflowMode: 1 | 
				
			||||
 | 
					    - _ZWrite: 0 | 
				
			||||
 | 
					    m_Colors: | 
				
			||||
 | 
					    - _BaseColor: {r: 0.837, g: 0.302308, b: 0.26365498, a: 0.24705882} | 
				
			||||
 | 
					    - _Color: {r: 0.837, g: 0.30230796, b: 0.26365495, a: 0.24705882} | 
				
			||||
 | 
					    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | 
				
			||||
 | 
					    - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | 
				
			||||
 | 
					  m_BuildTextureStacks: [] | 
				
			||||
 | 
					--- !u!114 &229737655439550173 | 
				
			||||
 | 
					MonoBehaviour: | 
				
			||||
 | 
					  m_ObjectHideFlags: 11 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_GameObject: {fileID: 0} | 
				
			||||
 | 
					  m_Enabled: 1 | 
				
			||||
 | 
					  m_EditorHideFlags: 0 | 
				
			||||
 | 
					  m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | 
				
			||||
 | 
					  m_Name:  | 
				
			||||
 | 
					  m_EditorClassIdentifier:  | 
				
			||||
 | 
					  version: 7 | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 2f6fa6aa88fbef742bf021e621193eaf | 
				
			||||
 | 
					NativeFormatImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  mainObjectFileID: 2100000 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									Binary file not shown.
								
							
						
					@ -0,0 +1,914 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 65a3c32d6ec98fc479df350fa87900c7 | 
				
			||||
 | 
					ModelImporter: | 
				
			||||
 | 
					  serializedVersion: 20101 | 
				
			||||
 | 
					  internalIDToNameTable: | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      74: -203655887218126122 | 
				
			||||
 | 
					    second: mixamo.com | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  materials: | 
				
			||||
 | 
					    materialImportMode: 1 | 
				
			||||
 | 
					    materialName: 0 | 
				
			||||
 | 
					    materialSearch: 1 | 
				
			||||
 | 
					    materialLocation: 1 | 
				
			||||
 | 
					  animations: | 
				
			||||
 | 
					    legacyGenerateAnimations: 4 | 
				
			||||
 | 
					    bakeSimulation: 0 | 
				
			||||
 | 
					    resampleCurves: 1 | 
				
			||||
 | 
					    optimizeGameObjects: 0 | 
				
			||||
 | 
					    motionNodeName:  | 
				
			||||
 | 
					    rigImportErrors:  | 
				
			||||
 | 
					    rigImportWarnings:  | 
				
			||||
 | 
					    animationImportErrors:  | 
				
			||||
 | 
					    animationImportWarnings:  | 
				
			||||
 | 
					    animationRetargetingWarnings:  | 
				
			||||
 | 
					    animationDoRetargetingWarnings: 0 | 
				
			||||
 | 
					    importAnimatedCustomProperties: 0 | 
				
			||||
 | 
					    importConstraints: 0 | 
				
			||||
 | 
					    animationCompression: 3 | 
				
			||||
 | 
					    animationRotationError: 0.5 | 
				
			||||
 | 
					    animationPositionError: 0.5 | 
				
			||||
 | 
					    animationScaleError: 0.5 | 
				
			||||
 | 
					    animationWrapMode: 0 | 
				
			||||
 | 
					    extraExposedTransformPaths: [] | 
				
			||||
 | 
					    extraUserProperties: [] | 
				
			||||
 | 
					    clipAnimations: | 
				
			||||
 | 
					    - serializedVersion: 16 | 
				
			||||
 | 
					      name: mixamo.com | 
				
			||||
 | 
					      takeName: mixamo.com | 
				
			||||
 | 
					      internalID: 0 | 
				
			||||
 | 
					      firstFrame: 0 | 
				
			||||
 | 
					      lastFrame: 1 | 
				
			||||
 | 
					      wrapMode: 0 | 
				
			||||
 | 
					      orientationOffsetY: 0 | 
				
			||||
 | 
					      level: 0 | 
				
			||||
 | 
					      cycleOffset: 0 | 
				
			||||
 | 
					      loop: 0 | 
				
			||||
 | 
					      hasAdditiveReferencePose: 0 | 
				
			||||
 | 
					      loopTime: 0 | 
				
			||||
 | 
					      loopBlend: 0 | 
				
			||||
 | 
					      loopBlendOrientation: 1 | 
				
			||||
 | 
					      loopBlendPositionY: 1 | 
				
			||||
 | 
					      loopBlendPositionXZ: 0 | 
				
			||||
 | 
					      keepOriginalOrientation: 1 | 
				
			||||
 | 
					      keepOriginalPositionY: 0 | 
				
			||||
 | 
					      keepOriginalPositionXZ: 1 | 
				
			||||
 | 
					      heightFromFeet: 1 | 
				
			||||
 | 
					      mirror: 0 | 
				
			||||
 | 
					      bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 | 
				
			||||
 | 
					      curves: [] | 
				
			||||
 | 
					      events: [] | 
				
			||||
 | 
					      transformMask: [] | 
				
			||||
 | 
					      maskType: 3 | 
				
			||||
 | 
					      maskSource: {instanceID: 0} | 
				
			||||
 | 
					      additiveReferencePoseFrame: 0 | 
				
			||||
 | 
					    isReadable: 0 | 
				
			||||
 | 
					  meshes: | 
				
			||||
 | 
					    lODScreenPercentages: [] | 
				
			||||
 | 
					    globalScale: 1 | 
				
			||||
 | 
					    meshCompression: 0 | 
				
			||||
 | 
					    addColliders: 0 | 
				
			||||
 | 
					    useSRGBMaterialColor: 1 | 
				
			||||
 | 
					    sortHierarchyByName: 1 | 
				
			||||
 | 
					    importVisibility: 1 | 
				
			||||
 | 
					    importBlendShapes: 1 | 
				
			||||
 | 
					    importCameras: 1 | 
				
			||||
 | 
					    importLights: 1 | 
				
			||||
 | 
					    fileIdsGeneration: 2 | 
				
			||||
 | 
					    swapUVChannels: 0 | 
				
			||||
 | 
					    generateSecondaryUV: 0 | 
				
			||||
 | 
					    useFileUnits: 1 | 
				
			||||
 | 
					    keepQuads: 0 | 
				
			||||
 | 
					    weldVertices: 1 | 
				
			||||
 | 
					    bakeAxisConversion: 0 | 
				
			||||
 | 
					    preserveHierarchy: 0 | 
				
			||||
 | 
					    skinWeightsMode: 0 | 
				
			||||
 | 
					    maxBonesPerVertex: 4 | 
				
			||||
 | 
					    minBoneWeight: 0.001 | 
				
			||||
 | 
					    meshOptimizationFlags: -1 | 
				
			||||
 | 
					    indexFormat: 0 | 
				
			||||
 | 
					    secondaryUVAngleDistortion: 8 | 
				
			||||
 | 
					    secondaryUVAreaDistortion: 15.000001 | 
				
			||||
 | 
					    secondaryUVHardAngle: 88 | 
				
			||||
 | 
					    secondaryUVMarginMethod: 1 | 
				
			||||
 | 
					    secondaryUVMinLightmapResolution: 40 | 
				
			||||
 | 
					    secondaryUVMinObjectScale: 1 | 
				
			||||
 | 
					    secondaryUVPackMargin: 4 | 
				
			||||
 | 
					    useFileScale: 1 | 
				
			||||
 | 
					  tangentSpace: | 
				
			||||
 | 
					    normalSmoothAngle: 60 | 
				
			||||
 | 
					    normalImportMode: 0 | 
				
			||||
 | 
					    tangentImportMode: 3 | 
				
			||||
 | 
					    normalCalculationMode: 4 | 
				
			||||
 | 
					    legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 | 
				
			||||
 | 
					    blendShapeNormalImportMode: 1 | 
				
			||||
 | 
					    normalSmoothingSource: 0 | 
				
			||||
 | 
					  referencedClips: [] | 
				
			||||
 | 
					  importAnimation: 1 | 
				
			||||
 | 
					  humanDescription: | 
				
			||||
 | 
					    serializedVersion: 3 | 
				
			||||
 | 
					    human: | 
				
			||||
 | 
					    - boneName: mixamorig:Hips | 
				
			||||
 | 
					      humanName: Hips | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      humanName: LeftUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      humanName: RightUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftLeg | 
				
			||||
 | 
					      humanName: LeftLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightLeg | 
				
			||||
 | 
					      humanName: RightLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftFoot | 
				
			||||
 | 
					      humanName: LeftFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightFoot | 
				
			||||
 | 
					      humanName: RightFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine | 
				
			||||
 | 
					      humanName: Spine | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine1 | 
				
			||||
 | 
					      humanName: Chest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Neck | 
				
			||||
 | 
					      humanName: Neck | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Head | 
				
			||||
 | 
					      humanName: Head | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      humanName: LeftShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightShoulder | 
				
			||||
 | 
					      humanName: RightShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftArm | 
				
			||||
 | 
					      humanName: LeftUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightArm | 
				
			||||
 | 
					      humanName: RightUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      humanName: LeftLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightForeArm | 
				
			||||
 | 
					      humanName: RightLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHand | 
				
			||||
 | 
					      humanName: LeftHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHand | 
				
			||||
 | 
					      humanName: RightHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      humanName: LeftToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightToeBase | 
				
			||||
 | 
					      humanName: RightToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandThumb1 | 
				
			||||
 | 
					      humanName: Left Thumb Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandThumb2 | 
				
			||||
 | 
					      humanName: Left Thumb Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandThumb3 | 
				
			||||
 | 
					      humanName: Left Thumb Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandIndex1 | 
				
			||||
 | 
					      humanName: Left Index Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandIndex2 | 
				
			||||
 | 
					      humanName: Left Index Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandIndex3 | 
				
			||||
 | 
					      humanName: Left Index Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandMiddle1 | 
				
			||||
 | 
					      humanName: Left Middle Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandMiddle2 | 
				
			||||
 | 
					      humanName: Left Middle Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandMiddle3 | 
				
			||||
 | 
					      humanName: Left Middle Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandRing1 | 
				
			||||
 | 
					      humanName: Left Ring Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandRing2 | 
				
			||||
 | 
					      humanName: Left Ring Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandRing3 | 
				
			||||
 | 
					      humanName: Left Ring Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandPinky1 | 
				
			||||
 | 
					      humanName: Left Little Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandPinky2 | 
				
			||||
 | 
					      humanName: Left Little Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHandPinky3 | 
				
			||||
 | 
					      humanName: Left Little Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandThumb1 | 
				
			||||
 | 
					      humanName: Right Thumb Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandThumb2 | 
				
			||||
 | 
					      humanName: Right Thumb Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandThumb3 | 
				
			||||
 | 
					      humanName: Right Thumb Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandIndex1 | 
				
			||||
 | 
					      humanName: Right Index Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandIndex2 | 
				
			||||
 | 
					      humanName: Right Index Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandIndex3 | 
				
			||||
 | 
					      humanName: Right Index Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandMiddle1 | 
				
			||||
 | 
					      humanName: Right Middle Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandMiddle2 | 
				
			||||
 | 
					      humanName: Right Middle Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandMiddle3 | 
				
			||||
 | 
					      humanName: Right Middle Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandRing1 | 
				
			||||
 | 
					      humanName: Right Ring Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandRing2 | 
				
			||||
 | 
					      humanName: Right Ring Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandRing3 | 
				
			||||
 | 
					      humanName: Right Ring Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandPinky1 | 
				
			||||
 | 
					      humanName: Right Little Proximal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandPinky2 | 
				
			||||
 | 
					      humanName: Right Little Intermediate | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHandPinky3 | 
				
			||||
 | 
					      humanName: Right Little Distal | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine2 | 
				
			||||
 | 
					      humanName: UpperChest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    skeleton: | 
				
			||||
 | 
					    - name: T-Pose(Clone) | 
				
			||||
 | 
					      parentName:  | 
				
			||||
 | 
					      position: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: 0, z: 0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: Beta_Joints | 
				
			||||
 | 
					      parentName: T-Pose(Clone) | 
				
			||||
 | 
					      position: {x: -0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: Beta_Surface | 
				
			||||
 | 
					      parentName: T-Pose(Clone) | 
				
			||||
 | 
					      position: {x: -0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Hips | 
				
			||||
 | 
					      parentName: T-Pose(Clone) | 
				
			||||
 | 
					      position: {x: 0.00000007727291, y: 1.0427487, z: 0.015543158} | 
				
			||||
 | 
					      rotation: {x: 5.5795913e-16, y: 0.00000002135681, z: -0.00000070372965, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.00000009234152, y: 0.10181588, z: 0.0013152092} | 
				
			||||
 | 
					      rotation: {x: -5.5794124e-16, y: -0.00000002135681, z: 0.00000070372874, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine1 | 
				
			||||
 | 
					      parentName: mixamorig:Spine | 
				
			||||
 | 
					      position: {x: -0.000000002519403, y: 0.10083451, z: -0.010008043} | 
				
			||||
 | 
					      rotation: {x: 3.8774097e-26, y: -4.2632574e-14, z: 6.82121e-13, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine2 | 
				
			||||
 | 
					      parentName: mixamorig:Spine1 | 
				
			||||
 | 
					      position: {x: -0.0000000034574863, y: 0.09100011, z: -0.013734171} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -1.8055514e-34, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Neck | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: -0.0000000063342855, y: 0.16671668, z: -0.025161678} | 
				
			||||
 | 
					      rotation: {x: -5.2041704e-18, y: 4.2632927e-14, z: 2.273737e-13, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Head | 
				
			||||
 | 
					      parentName: mixamorig:Neck | 
				
			||||
 | 
					      position: {x: 0.0000000042423185, y: 0.09617875, z: 0.016850075} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -2.3142172e-36, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:HeadTop_End | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: 0.0000000065082415, y: 0.17815155, z: 0.025849855} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftEye | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: -0.030675607, y: 0.06409507, z: 0.09283554} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightEye | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: 0.030675504, y: 0.064095, z: 0.09283547} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: -0.045704465, y: 0.10945985, z: -0.02627988} | 
				
			||||
 | 
					      rotation: {x: -0.000000044703484, y: 3.8567765e-14, z: -0.00000013563118, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      position: {x: -0.1059237, y: -0.005245829, z: -0.0223212} | 
				
			||||
 | 
					      rotation: {x: 0.000000044703484, y: 8.4346904e-14, z: -0.0000016602488, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftForeArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftArm | 
				
			||||
 | 
					      position: {x: -0.2784152, y: -0.0000008942865, z: 0.0000003745891} | 
				
			||||
 | 
					      rotation: {x: -0.000000059604645, y: 0.0000000038620516, z: 0.0000017958803, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHand | 
				
			||||
 | 
					      parentName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      position: {x: -0.2832884, y: -0.00000017440718, z: 0.00000037804523} | 
				
			||||
 | 
					      rotation: {x: 0.00022562433, y: 0.000000044703473, z: -1.0083181e-11, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandThumb1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.024661401, y: -0.015750492, z: 0.026824135} | 
				
			||||
 | 
					      rotation: {x: -0.118723094, y: 0.08687735, z: -0.11875274, w: 0.9819648} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandThumb2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandThumb1 | 
				
			||||
 | 
					      position: {x: -0.032298036, y: -0.018646907, z: 0.018646812} | 
				
			||||
 | 
					      rotation: {x: 0.00000010496793, y: -0.000004944398, z: -0.000004780959, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandThumb3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandThumb2 | 
				
			||||
 | 
					      position: {x: -0.02652565, y: -0.015314929, z: 0.015314716} | 
				
			||||
 | 
					      rotation: {x: 4.661964e-12, y: 0.00000059509927, z: 0.00000063981753, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandThumb4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandThumb3 | 
				
			||||
 | 
					      position: {x: -0.019545669, y: -0.0112850005, z: 0.011284921} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandIndex1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.09109301, y: -0.005170834, z: 0.02260073} | 
				
			||||
 | 
					      rotation: {x: 0.00000007450579, y: -6.7234625e-12, z: -0.000000014901159, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandIndex2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandIndex1 | 
				
			||||
 | 
					      position: {x: -0.036764093, y: -0.00000006939138, z: 0.00000029242517} | 
				
			||||
 | 
					      rotation: {x: -0.00000010430811, y: 0.000000014901151, z: -6.7230145e-12, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandIndex3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandIndex2 | 
				
			||||
 | 
					      position: {x: -0.028830625, y: 0.00000038511968, z: -0.00000042764816} | 
				
			||||
 | 
					      rotation: {x: 8.452564e-15, y: 0.0000000148742725, z: -0.00000005961137, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandIndex4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandIndex3 | 
				
			||||
 | 
					      position: {x: -0.023927199, y: 0.00000037025907, z: 0.00000033554434} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandMiddle1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.095334016, y: -0.00000033924047, z: 0.00000013937026} | 
				
			||||
 | 
					      rotation: {x: 0.000000014901157, y: -0.00000004469004, z: 0.00000002982249, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandMiddle2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandMiddle1 | 
				
			||||
 | 
					      position: {x: -0.036982365, y: 0.00000001961359, z: 0.00000017916967} | 
				
			||||
 | 
					      rotation: {x: -0.0000000149011585, y: 0.000000014901165, z: -6.7261296e-12, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandMiddle3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandMiddle2 | 
				
			||||
 | 
					      position: {x: -0.029509215, y: -0.00000039376084, z: 0.0000001644796} | 
				
			||||
 | 
					      rotation: {x: 5.594566e-16, y: -6.7223536e-12, z: -0.000000014901161, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandMiddle4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandMiddle3 | 
				
			||||
 | 
					      position: {x: -0.028339025, y: -0.0000003893482, z: -0.00000009504223} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandRing1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.091045275, y: -0.00043939505, z: -0.018650847} | 
				
			||||
 | 
					      rotation: {x: 0.000000029802315, y: -0.000000029795597, z: 0.000000014914605, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandRing2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandRing1 | 
				
			||||
 | 
					      position: {x: -0.031540267, y: -0.00000006553468, z: 0.00000010425744} | 
				
			||||
 | 
					      rotation: {x: -0.000000029802314, y: 0.000000029782148, z: -0.000000044716913, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandRing3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandRing2 | 
				
			||||
 | 
					      position: {x: -0.029376723, y: -0.00000045458617, z: -0.00000006864757} | 
				
			||||
 | 
					      rotation: {x: 0.00000005960463, y: -0.0000000148944315, z: 0.000000014907876, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandRing4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandRing3 | 
				
			||||
 | 
					      position: {x: -0.026474526, y: -0.00000049804413, z: 7.0705153e-10} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandPinky1 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHand | 
				
			||||
 | 
					      position: {x: -0.08077778, y: -0.004886682, z: -0.03806067} | 
				
			||||
 | 
					      rotation: {x: 0.000000029802317, y: -0.000000014907881, z: -0.000000014894434, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandPinky2 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandPinky1 | 
				
			||||
 | 
					      position: {x: -0.036000345, y: -0.000000022522151, z: -0.00000026238794} | 
				
			||||
 | 
					      rotation: {x: 0.000000029802315, y: -0.000000014894437, z: 0.000000014907881, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandPinky3 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandPinky2 | 
				
			||||
 | 
					      position: {x: -0.021142116, y: 0.00000019538281, z: -0.00000002864415} | 
				
			||||
 | 
					      rotation: {x: -0.00000005960463, y: -0.000000029815762, z: -0.000000029788868, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftHandPinky4 | 
				
			||||
 | 
					      parentName: mixamorig:LeftHandPinky3 | 
				
			||||
 | 
					      position: {x: -0.019756826, y: 0.00000012405657, z: -0.00000044301405} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: 0.045699697, y: 0.10946176, z: -0.026280174} | 
				
			||||
 | 
					      rotation: {x: -0.000000014901161, y: 4.3930442e-14, z: 0.000000042395698, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightArm | 
				
			||||
 | 
					      parentName: mixamorig:RightShoulder | 
				
			||||
 | 
					      position: {x: 0.105928436, y: -0.0052479836, z: -0.022320986} | 
				
			||||
 | 
					      rotation: {x: 0.000000014901161, y: -1.2978756e-15, z: -0.000000042395467, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightForeArm | 
				
			||||
 | 
					      parentName: mixamorig:RightArm | 
				
			||||
 | 
					      position: {x: 0.2784152, y: -0.00000033079218, z: 0.000000116763104} | 
				
			||||
 | 
					      rotation: {x: -0.000000059604638, y: 0.0000017611261, z: -1.09214605e-13, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHand | 
				
			||||
 | 
					      parentName: mixamorig:RightForeArm | 
				
			||||
 | 
					      position: {x: 0.2832884, y: -0.0000000015814171, z: 0.00000055816014} | 
				
			||||
 | 
					      rotation: {x: 0.00023261023, y: -0.0000018096918, z: 4.2094897e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandPinky1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.080766745, y: -0.0048845927, z: -0.038060103} | 
				
			||||
 | 
					      rotation: {x: 0.000000074505586, y: 0.0000138888945, z: 0.000000014902197, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandPinky2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandPinky1 | 
				
			||||
 | 
					      position: {x: 0.036000345, y: 0.00000039676655, z: 0.0000005081442} | 
				
			||||
 | 
					      rotation: {x: -0.000000014900952, y: -0.000013859092, z: -0.00000001491523, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandPinky3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandPinky2 | 
				
			||||
 | 
					      position: {x: 0.021142116, y: 0.00000015137925, z: 0.00000014793768} | 
				
			||||
 | 
					      rotation: {x: -0.000000089406946, y: -6.1947887e-19, z: -1.3318336e-15, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandPinky4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandPinky3 | 
				
			||||
 | 
					      position: {x: 0.019756826, y: -0.00000018521958, z: -0.000000009839841} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandRing1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.09103588, y: -0.00043914348, z: -0.018650724} | 
				
			||||
 | 
					      rotation: {x: 0.000000029802315, y: 0.000000029795387, z: -0.00000001491502, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandRing2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandRing1 | 
				
			||||
 | 
					      position: {x: 0.031540267, y: 0.00000023997296, z: 0.0000004885121} | 
				
			||||
 | 
					      rotation: {x: -0.000000029802314, y: -0.000000029781521, z: 0.000000044717336, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandRing3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandRing2 | 
				
			||||
 | 
					      position: {x: 0.029376723, y: -0.00000041600654, z: -0.00000039660634} | 
				
			||||
 | 
					      rotation: {x: 0.000000059604627, y: 0.0000000148664965, z: -0.00000007451271, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandRing4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandRing3 | 
				
			||||
 | 
					      position: {x: 0.026474526, y: 0.00000024608212, z: -0.000000022949234} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandMiddle1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.09532503, y: -0.00000016312302, z: 0.00000016791842} | 
				
			||||
 | 
					      rotation: {x: 0.000000014901157, y: 0.000000044689624, z: -0.000000029823113, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandMiddle2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandMiddle1 | 
				
			||||
 | 
					      position: {x: 0.036982365, y: 0.00000015066959, z: -0.00000022545524} | 
				
			||||
 | 
					      rotation: {x: -0.0000000149011585, y: -0.000000014901165, z: 6.930773e-12, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandMiddle3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandMiddle2 | 
				
			||||
 | 
					      position: {x: 0.029509215, y: -0.000000003113245, z: -0.0000000030340255} | 
				
			||||
 | 
					      rotation: {x: 0.000000059603845, y: 0.000017673352, z: 0.00000004469067, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandMiddle4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandMiddle3 | 
				
			||||
 | 
					      position: {x: 0.028339025, y: 0.00000008053241, z: 0.00000053787704} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandIndex1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.09108281, y: -0.0051678894, z: 0.022601163} | 
				
			||||
 | 
					      rotation: {x: 0.000000014901159, y: 6.934323e-12, z: 0.0000000149011585, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandIndex2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandIndex1 | 
				
			||||
 | 
					      position: {x: 0.036764093, y: 0.00000019227156, z: 0.0000003235567} | 
				
			||||
 | 
					      rotation: {x: -0.000000044703473, y: -0.000000014901154, z: 6.9321007e-12, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandIndex3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandIndex2 | 
				
			||||
 | 
					      position: {x: 0.028830625, y: -0.00000049601215, z: 0.00000040448975} | 
				
			||||
 | 
					      rotation: {x: 0.000000029802319, y: 0.000000014915011, z: 0.000000029795393, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandIndex4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandIndex3 | 
				
			||||
 | 
					      position: {x: 0.023927199, y: 0.000000268147, z: 0.00000028020133} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandThumb1 | 
				
			||||
 | 
					      parentName: mixamorig:RightHand | 
				
			||||
 | 
					      position: {x: 0.024648061, y: -0.015727142, z: 0.026826264} | 
				
			||||
 | 
					      rotation: {x: -0.118725814, y: -0.086873986, z: 0.11875655, w: 0.9819644} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandThumb2 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandThumb1 | 
				
			||||
 | 
					      position: {x: 0.03229772, y: -0.018647088, z: 0.018647185} | 
				
			||||
 | 
					      rotation: {x: 0.000000029786868, y: -0.0000065657905, z: -0.0000065806976, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandThumb3 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandThumb2 | 
				
			||||
 | 
					      position: {x: 0.02652605, y: -0.015314492, z: 0.015314456} | 
				
			||||
 | 
					      rotation: {x: 0.000000029804987, y: 0.000010714707, z: 0.000010640214, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightHandThumb4 | 
				
			||||
 | 
					      parentName: mixamorig:RightHandThumb3 | 
				
			||||
 | 
					      position: {x: 0.019545805, y: -0.011284617, z: 0.01128507} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: 0.08207796, y: -0.06751662, z: -0.015995594} | 
				
			||||
 | 
					      rotation: {x: -0.0006736767, y: -0.000000022158684, z: 0.0000007132908, w: 0.99999976} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightLeg | 
				
			||||
 | 
					      parentName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      position: {x: -8.435572e-10, y: -0.44370535, z: 0.0028615638} | 
				
			||||
 | 
					      rotation: {x: 0.0013461137, y: 0.00000001453026, z: 0.0000000017475387, w: 0.9999991} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightFoot | 
				
			||||
 | 
					      parentName: mixamorig:RightLeg | 
				
			||||
 | 
					      position: {x: -0.000000009644582, y: -0.4442773, z: -0.02983789} | 
				
			||||
 | 
					      rotation: {x: -0.0006724375, y: 6.846273e-10, z: -0.000000011323817, w: 0.99999976} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightToeBase | 
				
			||||
 | 
					      parentName: mixamorig:RightFoot | 
				
			||||
 | 
					      position: {x: 0.00000002360438, y: -0.08728669, z: 0.107105605} | 
				
			||||
 | 
					      rotation: {x: 0.000000014650141, y: 6.5304206e-11, z: -3.3796616e-12, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightToe_End | 
				
			||||
 | 
					      parentName: mixamorig:RightToeBase | 
				
			||||
 | 
					      position: {x: 0.000000020942645, y: -0.000006763694, z: 0.0927812} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.082077816, y: -0.06751714, z: -0.015995556} | 
				
			||||
 | 
					      rotation: {x: -0.0007022143, y: -0.000000022163992, z: 0.0000007135213, w: 0.99999976} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftLeg | 
				
			||||
 | 
					      parentName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      position: {x: 0.000000004110158, y: -0.44370472, z: 0.0028464263} | 
				
			||||
 | 
					      rotation: {x: 0.0014022698, y: -3.3268402e-10, z: -1.3309691e-10, w: 0.99999905} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftFoot | 
				
			||||
 | 
					      parentName: mixamorig:LeftLeg | 
				
			||||
 | 
					      position: {x: -0.0000000047163935, y: -0.44427872, z: -0.029821906} | 
				
			||||
 | 
					      rotation: {x: -0.0007000565, y: 6.3139166e-10, z: -0.000000010605688, w: 0.99999976} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftToeBase | 
				
			||||
 | 
					      parentName: mixamorig:LeftFoot | 
				
			||||
 | 
					      position: {x: 0.000000029609879, y: -0.087286696, z: 0.1071056} | 
				
			||||
 | 
					      rotation: {x: 2.4374452e-10, y: 1.1699966e-10, z: 9.293838e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftToe_End | 
				
			||||
 | 
					      parentName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      position: {x: 0.000000025080618, y: -0.0000067668298, z: 0.09278136} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    armTwist: 0.5 | 
				
			||||
 | 
					    foreArmTwist: 0.5 | 
				
			||||
 | 
					    upperLegTwist: 0.5 | 
				
			||||
 | 
					    legTwist: 0.5 | 
				
			||||
 | 
					    armStretch: 0.05 | 
				
			||||
 | 
					    legStretch: 0.05 | 
				
			||||
 | 
					    feetSpacing: 0 | 
				
			||||
 | 
					    globalScale: 1 | 
				
			||||
 | 
					    rootMotionBoneName:  | 
				
			||||
 | 
					    hasTranslationDoF: 0 | 
				
			||||
 | 
					    hasExtraRoot: 1 | 
				
			||||
 | 
					    skeletonHasParents: 1 | 
				
			||||
 | 
					  lastHumanDescriptionAvatarSource: {instanceID: 0} | 
				
			||||
 | 
					  autoGenerateAvatarMappingIfUnspecified: 1 | 
				
			||||
 | 
					  animationType: 3 | 
				
			||||
 | 
					  humanoidOversampling: 1 | 
				
			||||
 | 
					  avatarSetup: 1 | 
				
			||||
 | 
					  additionalBone: 0 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,135 @@ | 
				
			|||||
 | 
					%YAML 1.1 | 
				
			||||
 | 
					%TAG !u! tag:unity3d.com,2011: | 
				
			||||
 | 
					--- !u!114 &-2951126682242351315 | 
				
			||||
 | 
					MonoBehaviour: | 
				
			||||
 | 
					  m_ObjectHideFlags: 11 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_GameObject: {fileID: 0} | 
				
			||||
 | 
					  m_Enabled: 1 | 
				
			||||
 | 
					  m_EditorHideFlags: 0 | 
				
			||||
 | 
					  m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | 
				
			||||
 | 
					  m_Name:  | 
				
			||||
 | 
					  m_EditorClassIdentifier:  | 
				
			||||
 | 
					  version: 7 | 
				
			||||
 | 
					--- !u!21 &2100000 | 
				
			||||
 | 
					Material: | 
				
			||||
 | 
					  serializedVersion: 8 | 
				
			||||
 | 
					  m_ObjectHideFlags: 0 | 
				
			||||
 | 
					  m_CorrespondingSourceObject: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabInstance: {fileID: 0} | 
				
			||||
 | 
					  m_PrefabAsset: {fileID: 0} | 
				
			||||
 | 
					  m_Name: TargetDebug | 
				
			||||
 | 
					  m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} | 
				
			||||
 | 
					  m_Parent: {fileID: 0} | 
				
			||||
 | 
					  m_ModifiedSerializedProperties: 0 | 
				
			||||
 | 
					  m_ValidKeywords: [] | 
				
			||||
 | 
					  m_InvalidKeywords: [] | 
				
			||||
 | 
					  m_LightmapFlags: 4 | 
				
			||||
 | 
					  m_EnableInstancingVariants: 0 | 
				
			||||
 | 
					  m_DoubleSidedGI: 0 | 
				
			||||
 | 
					  m_CustomRenderQueue: -1 | 
				
			||||
 | 
					  stringTagMap: | 
				
			||||
 | 
					    RenderType: Opaque | 
				
			||||
 | 
					  disabledShaderPasses: [] | 
				
			||||
 | 
					  m_LockedProperties:  | 
				
			||||
 | 
					  m_SavedProperties: | 
				
			||||
 | 
					    serializedVersion: 3 | 
				
			||||
 | 
					    m_TexEnvs: | 
				
			||||
 | 
					    - _BaseMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _BumpMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailAlbedoMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailMask: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _DetailNormalMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _EmissionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MainTex: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _MetallicGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _OcclusionMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _ParallaxMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - _SpecGlossMap: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_Lightmaps: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_LightmapsInd: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    - unity_ShadowMasks: | 
				
			||||
 | 
					        m_Texture: {fileID: 0} | 
				
			||||
 | 
					        m_Scale: {x: 1, y: 1} | 
				
			||||
 | 
					        m_Offset: {x: 0, y: 0} | 
				
			||||
 | 
					    m_Ints: [] | 
				
			||||
 | 
					    m_Floats: | 
				
			||||
 | 
					    - _AlphaClip: 0 | 
				
			||||
 | 
					    - _AlphaToMask: 0 | 
				
			||||
 | 
					    - _Blend: 0 | 
				
			||||
 | 
					    - _BlendModePreserveSpecular: 1 | 
				
			||||
 | 
					    - _BumpScale: 1 | 
				
			||||
 | 
					    - _ClearCoatMask: 0 | 
				
			||||
 | 
					    - _ClearCoatSmoothness: 0 | 
				
			||||
 | 
					    - _Cull: 2 | 
				
			||||
 | 
					    - _Cutoff: 0.5 | 
				
			||||
 | 
					    - _DetailAlbedoMapScale: 1 | 
				
			||||
 | 
					    - _DetailNormalMapScale: 1 | 
				
			||||
 | 
					    - _DstBlend: 0 | 
				
			||||
 | 
					    - _DstBlendAlpha: 0 | 
				
			||||
 | 
					    - _EnvironmentReflections: 1 | 
				
			||||
 | 
					    - _GlossMapScale: 1 | 
				
			||||
 | 
					    - _Glossiness: 0 | 
				
			||||
 | 
					    - _GlossyReflections: 1 | 
				
			||||
 | 
					    - _Metallic: 0 | 
				
			||||
 | 
					    - _Mode: 0 | 
				
			||||
 | 
					    - _OcclusionStrength: 1 | 
				
			||||
 | 
					    - _Parallax: 0.02 | 
				
			||||
 | 
					    - _QueueOffset: 0 | 
				
			||||
 | 
					    - _ReceiveShadows: 1 | 
				
			||||
 | 
					    - _Smoothness: 0 | 
				
			||||
 | 
					    - _SmoothnessTextureChannel: 0 | 
				
			||||
 | 
					    - _SpecularHighlights: 1 | 
				
			||||
 | 
					    - _SrcBlend: 1 | 
				
			||||
 | 
					    - _SrcBlendAlpha: 1 | 
				
			||||
 | 
					    - _Surface: 0 | 
				
			||||
 | 
					    - _UVSec: 0 | 
				
			||||
 | 
					    - _WorkflowMode: 1 | 
				
			||||
 | 
					    - _ZWrite: 1 | 
				
			||||
 | 
					    m_Colors: | 
				
			||||
 | 
					    - _BaseColor: {r: 0.5849056, g: 0.5849056, b: 0.5849056, a: 1} | 
				
			||||
 | 
					    - _Color: {r: 0.5849056, g: 0.5849056, b: 0.5849056, a: 1} | 
				
			||||
 | 
					    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | 
				
			||||
 | 
					    - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | 
				
			||||
 | 
					  m_BuildTextureStacks: [] | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 627fb1f9c85d0ab498c358b8ff0d6de6 | 
				
			||||
 | 
					NativeFormatImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  mainObjectFileID: 0 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 59ac31a5d62fe484ab3049c9aa046883 | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									Binary file not shown.
								
							
						
					@ -0,0 +1,13 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 0e791689cf0300c4fbe8be76f09fccff | 
				
			||||
 | 
					ScriptedImporter: | 
				
			||||
 | 
					  internalIDToNameTable: [] | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  serializedVersion: 2 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
 | 
					  script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} | 
				
			||||
 | 
					  optimizeModel: 1 | 
				
			||||
 | 
					  forceArbitraryBatchSize: 1 | 
				
			||||
 | 
					  treatErrorsAsWarnings: 0 | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 47b3f2697844b6943a49ac0ee8c0dbac | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
@ -0,0 +1,8 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 34dfde91388b827469e7eca847c581f3 | 
				
			||||
 | 
					folderAsset: yes | 
				
			||||
 | 
					DefaultImporter: | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									Binary file not shown.
								
							
						
					@ -0,0 +1,767 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 2d10b50dc653e4052a4407c743c3da5c | 
				
			||||
 | 
					ModelImporter: | 
				
			||||
 | 
					  serializedVersion: 20200 | 
				
			||||
 | 
					  internalIDToNameTable: | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100000 | 
				
			||||
 | 
					    second: //RootNode | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100002 | 
				
			||||
 | 
					    second: mixamorig:Head | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100004 | 
				
			||||
 | 
					    second: mixamorig:HeadTop_End | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100006 | 
				
			||||
 | 
					    second: mixamorig:Hips | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100008 | 
				
			||||
 | 
					    second: mixamorig:LeftArm | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100010 | 
				
			||||
 | 
					    second: mixamorig:LeftFoot | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100012 | 
				
			||||
 | 
					    second: mixamorig:LeftForeArm | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100014 | 
				
			||||
 | 
					    second: mixamorig:LeftHand | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100016 | 
				
			||||
 | 
					    second: mixamorig:LeftLeg | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100018 | 
				
			||||
 | 
					    second: mixamorig:LeftShoulder | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100020 | 
				
			||||
 | 
					    second: mixamorig:LeftToe_End | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100022 | 
				
			||||
 | 
					    second: mixamorig:LeftToeBase | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100024 | 
				
			||||
 | 
					    second: mixamorig:LeftUpLeg | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100026 | 
				
			||||
 | 
					    second: mixamorig:Neck | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100028 | 
				
			||||
 | 
					    second: mixamorig:RightArm | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100030 | 
				
			||||
 | 
					    second: mixamorig:RightFoot | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100032 | 
				
			||||
 | 
					    second: mixamorig:RightForeArm | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100034 | 
				
			||||
 | 
					    second: mixamorig:RightHand | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100036 | 
				
			||||
 | 
					    second: mixamorig:RightLeg | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100038 | 
				
			||||
 | 
					    second: mixamorig:RightShoulder | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100040 | 
				
			||||
 | 
					    second: mixamorig:RightToe_End | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100042 | 
				
			||||
 | 
					    second: mixamorig:RightToeBase | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100044 | 
				
			||||
 | 
					    second: mixamorig:RightUpLeg | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100046 | 
				
			||||
 | 
					    second: mixamorig:Spine | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100048 | 
				
			||||
 | 
					    second: mixamorig:Spine1 | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      1: 100050 | 
				
			||||
 | 
					    second: mixamorig:Spine2 | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400000 | 
				
			||||
 | 
					    second: //RootNode | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400002 | 
				
			||||
 | 
					    second: mixamorig:Head | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400004 | 
				
			||||
 | 
					    second: mixamorig:HeadTop_End | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400006 | 
				
			||||
 | 
					    second: mixamorig:Hips | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400008 | 
				
			||||
 | 
					    second: mixamorig:LeftArm | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400010 | 
				
			||||
 | 
					    second: mixamorig:LeftFoot | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400012 | 
				
			||||
 | 
					    second: mixamorig:LeftForeArm | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400014 | 
				
			||||
 | 
					    second: mixamorig:LeftHand | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400016 | 
				
			||||
 | 
					    second: mixamorig:LeftLeg | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400018 | 
				
			||||
 | 
					    second: mixamorig:LeftShoulder | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400020 | 
				
			||||
 | 
					    second: mixamorig:LeftToe_End | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400022 | 
				
			||||
 | 
					    second: mixamorig:LeftToeBase | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400024 | 
				
			||||
 | 
					    second: mixamorig:LeftUpLeg | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400026 | 
				
			||||
 | 
					    second: mixamorig:Neck | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400028 | 
				
			||||
 | 
					    second: mixamorig:RightArm | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400030 | 
				
			||||
 | 
					    second: mixamorig:RightFoot | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400032 | 
				
			||||
 | 
					    second: mixamorig:RightForeArm | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400034 | 
				
			||||
 | 
					    second: mixamorig:RightHand | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400036 | 
				
			||||
 | 
					    second: mixamorig:RightLeg | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400038 | 
				
			||||
 | 
					    second: mixamorig:RightShoulder | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400040 | 
				
			||||
 | 
					    second: mixamorig:RightToe_End | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400042 | 
				
			||||
 | 
					    second: mixamorig:RightToeBase | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400044 | 
				
			||||
 | 
					    second: mixamorig:RightUpLeg | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400046 | 
				
			||||
 | 
					    second: mixamorig:Spine | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400048 | 
				
			||||
 | 
					    second: mixamorig:Spine1 | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      4: 400050 | 
				
			||||
 | 
					    second: mixamorig:Spine2 | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      74: 7400000 | 
				
			||||
 | 
					    second: Idle | 
				
			||||
 | 
					  - first: | 
				
			||||
 | 
					      95: 9500000 | 
				
			||||
 | 
					    second: //RootNode | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  materials: | 
				
			||||
 | 
					    materialImportMode: 1 | 
				
			||||
 | 
					    materialName: 0 | 
				
			||||
 | 
					    materialSearch: 1 | 
				
			||||
 | 
					    materialLocation: 1 | 
				
			||||
 | 
					  animations: | 
				
			||||
 | 
					    legacyGenerateAnimations: 4 | 
				
			||||
 | 
					    bakeSimulation: 0 | 
				
			||||
 | 
					    resampleCurves: 1 | 
				
			||||
 | 
					    optimizeGameObjects: 0 | 
				
			||||
 | 
					    motionNodeName:  | 
				
			||||
 | 
					    rigImportErrors:  | 
				
			||||
 | 
					    rigImportWarnings:  | 
				
			||||
 | 
					    animationImportErrors:  | 
				
			||||
 | 
					    animationImportWarnings:  | 
				
			||||
 | 
					    animationRetargetingWarnings:  | 
				
			||||
 | 
					    animationDoRetargetingWarnings: 0 | 
				
			||||
 | 
					    importAnimatedCustomProperties: 0 | 
				
			||||
 | 
					    importConstraints: 0 | 
				
			||||
 | 
					    animationCompression: 3 | 
				
			||||
 | 
					    animationRotationError: 0.5 | 
				
			||||
 | 
					    animationPositionError: 0.5 | 
				
			||||
 | 
					    animationScaleError: 0.5 | 
				
			||||
 | 
					    animationWrapMode: 0 | 
				
			||||
 | 
					    extraExposedTransformPaths: [] | 
				
			||||
 | 
					    extraUserProperties: [] | 
				
			||||
 | 
					    clipAnimations: | 
				
			||||
 | 
					    - serializedVersion: 16 | 
				
			||||
 | 
					      name: Idle | 
				
			||||
 | 
					      takeName: mixamo.com | 
				
			||||
 | 
					      internalID: 0 | 
				
			||||
 | 
					      firstFrame: 0 | 
				
			||||
 | 
					      lastFrame: 500 | 
				
			||||
 | 
					      wrapMode: 0 | 
				
			||||
 | 
					      orientationOffsetY: 0 | 
				
			||||
 | 
					      level: 0.07 | 
				
			||||
 | 
					      cycleOffset: 0 | 
				
			||||
 | 
					      loop: 0 | 
				
			||||
 | 
					      hasAdditiveReferencePose: 0 | 
				
			||||
 | 
					      loopTime: 1 | 
				
			||||
 | 
					      loopBlend: 0 | 
				
			||||
 | 
					      loopBlendOrientation: 0 | 
				
			||||
 | 
					      loopBlendPositionY: 1 | 
				
			||||
 | 
					      loopBlendPositionXZ: 0 | 
				
			||||
 | 
					      keepOriginalOrientation: 1 | 
				
			||||
 | 
					      keepOriginalPositionY: 0 | 
				
			||||
 | 
					      keepOriginalPositionXZ: 1 | 
				
			||||
 | 
					      heightFromFeet: 1 | 
				
			||||
 | 
					      mirror: 0 | 
				
			||||
 | 
					      bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 | 
				
			||||
 | 
					      curves: [] | 
				
			||||
 | 
					      events: [] | 
				
			||||
 | 
					      transformMask: [] | 
				
			||||
 | 
					      maskType: 3 | 
				
			||||
 | 
					      maskSource: {instanceID: 0} | 
				
			||||
 | 
					      additiveReferencePoseFrame: 0 | 
				
			||||
 | 
					    isReadable: 1 | 
				
			||||
 | 
					  meshes: | 
				
			||||
 | 
					    lODScreenPercentages: [] | 
				
			||||
 | 
					    globalScale: 1 | 
				
			||||
 | 
					    meshCompression: 0 | 
				
			||||
 | 
					    addColliders: 0 | 
				
			||||
 | 
					    useSRGBMaterialColor: 1 | 
				
			||||
 | 
					    sortHierarchyByName: 1 | 
				
			||||
 | 
					    importVisibility: 1 | 
				
			||||
 | 
					    importBlendShapes: 1 | 
				
			||||
 | 
					    importCameras: 1 | 
				
			||||
 | 
					    importLights: 1 | 
				
			||||
 | 
					    fileIdsGeneration: 1 | 
				
			||||
 | 
					    swapUVChannels: 0 | 
				
			||||
 | 
					    generateSecondaryUV: 0 | 
				
			||||
 | 
					    useFileUnits: 1 | 
				
			||||
 | 
					    keepQuads: 0 | 
				
			||||
 | 
					    weldVertices: 1 | 
				
			||||
 | 
					    bakeAxisConversion: 0 | 
				
			||||
 | 
					    preserveHierarchy: 0 | 
				
			||||
 | 
					    skinWeightsMode: 0 | 
				
			||||
 | 
					    maxBonesPerVertex: 4 | 
				
			||||
 | 
					    minBoneWeight: 0.001 | 
				
			||||
 | 
					    meshOptimizationFlags: -1 | 
				
			||||
 | 
					    indexFormat: 0 | 
				
			||||
 | 
					    secondaryUVAngleDistortion: 8 | 
				
			||||
 | 
					    secondaryUVAreaDistortion: 15.000001 | 
				
			||||
 | 
					    secondaryUVHardAngle: 88 | 
				
			||||
 | 
					    secondaryUVMarginMethod: 0 | 
				
			||||
 | 
					    secondaryUVMinLightmapResolution: 40 | 
				
			||||
 | 
					    secondaryUVMinObjectScale: 1 | 
				
			||||
 | 
					    secondaryUVPackMargin: 4 | 
				
			||||
 | 
					    useFileScale: 1 | 
				
			||||
 | 
					  tangentSpace: | 
				
			||||
 | 
					    normalSmoothAngle: 60 | 
				
			||||
 | 
					    normalImportMode: 0 | 
				
			||||
 | 
					    tangentImportMode: 3 | 
				
			||||
 | 
					    normalCalculationMode: 4 | 
				
			||||
 | 
					    legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 | 
				
			||||
 | 
					    blendShapeNormalImportMode: 1 | 
				
			||||
 | 
					    normalSmoothingSource: 0 | 
				
			||||
 | 
					  referencedClips: [] | 
				
			||||
 | 
					  importAnimation: 1 | 
				
			||||
 | 
					  humanDescription: | 
				
			||||
 | 
					    serializedVersion: 3 | 
				
			||||
 | 
					    human: | 
				
			||||
 | 
					    - boneName: mixamorig:Hips | 
				
			||||
 | 
					      humanName: Hips | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      humanName: LeftUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      humanName: RightUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftLeg | 
				
			||||
 | 
					      humanName: LeftLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightLeg | 
				
			||||
 | 
					      humanName: RightLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftFoot | 
				
			||||
 | 
					      humanName: LeftFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightFoot | 
				
			||||
 | 
					      humanName: RightFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine | 
				
			||||
 | 
					      humanName: Spine | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine1 | 
				
			||||
 | 
					      humanName: Chest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Neck | 
				
			||||
 | 
					      humanName: Neck | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Head | 
				
			||||
 | 
					      humanName: Head | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      humanName: LeftShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightShoulder | 
				
			||||
 | 
					      humanName: RightShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftArm | 
				
			||||
 | 
					      humanName: LeftUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightArm | 
				
			||||
 | 
					      humanName: RightUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      humanName: LeftLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightForeArm | 
				
			||||
 | 
					      humanName: RightLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHand | 
				
			||||
 | 
					      humanName: LeftHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHand | 
				
			||||
 | 
					      humanName: RightHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      humanName: LeftToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightToeBase | 
				
			||||
 | 
					      humanName: RightToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine2 | 
				
			||||
 | 
					      humanName: UpperChest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    skeleton: | 
				
			||||
 | 
					    - name: Backflip(Clone) | 
				
			||||
 | 
					      parentName:  | 
				
			||||
 | 
					      position: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: 0, z: 0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: humanoidT | 
				
			||||
 | 
					      parentName: Backflip(Clone) | 
				
			||||
 | 
					      position: {x: -0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: butt | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.028619736, y: 1.0587679, z: 0.002142583} | 
				
			||||
 | 
					      rotation: {x: 0.7049101, y: -0.026212664, z: 0.013773171, w: 0.70867836} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: lower_waist | 
				
			||||
 | 
					      parentName: butt | 
				
			||||
 | 
					      position: {x: -0.021319339, y: 0.00040355325, z: -0.16483356} | 
				
			||||
 | 
					      rotation: {x: 0.0031044185, y: 0.0020000096, z: -0.000018799677, w: 0.9999932} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: abdomen_y | 
				
			||||
 | 
					      parentName: lower_waist | 
				
			||||
 | 
					      position: {x: -0.0000723721, y: 0.000012806966, z: -0.0017823265} | 
				
			||||
 | 
					      rotation: {x: 0.00014829637, y: 0.0018769234, z: -0.02827898, w: 0.9995983} | 
				
			||||
 | 
					      scale: {x: 1, y: 1.0000005, z: 1.0000002} | 
				
			||||
 | 
					    - name: upper_waist | 
				
			||||
 | 
					      parentName: lower_waist | 
				
			||||
 | 
					      position: {x: -0.0019383731, y: 0.00014567096, z: -0.14226863} | 
				
			||||
 | 
					      rotation: {x: -0.0004889473, y: 0.007208624, z: -0.028266912, w: 0.9995743} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: torso | 
				
			||||
 | 
					      parentName: upper_waist | 
				
			||||
 | 
					      position: {x: -0.010000003, y: 0, z: -0.12} | 
				
			||||
 | 
					      rotation: {x: -0, y: -0, z: 5.134097e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: head | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: 0.00012124982, y: -0.00066340127, z: -0.20378074} | 
				
			||||
 | 
					      rotation: {x: -0.7070211, y: -0.00034404645, z: -0.00035778637, w: 0.70719224} | 
				
			||||
 | 
					      scale: {x: 0.18, y: 0.18000005, z: 0.18000005} | 
				
			||||
 | 
					    - name: left_upper_arm | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.00805471, y: -0.3095426, z: -0.046386097} | 
				
			||||
 | 
					      rotation: {x: -0.050138354, y: -0.15586165, z: -0.020825602, w: 0.9862858} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_larm | 
				
			||||
 | 
					      parentName: left_upper_arm | 
				
			||||
 | 
					      position: {x: -0.05012562, y: -0.3203213, z: 0.013551146} | 
				
			||||
 | 
					      rotation: {x: -0.1464947, y: -0.69702035, z: -0.08435819, w: 0.6968398} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hand | 
				
			||||
 | 
					      parentName: left_larm | 
				
			||||
 | 
					      position: {x: -0.000015493482, y: -0.15598094, z: -0.000019282103} | 
				
			||||
 | 
					      rotation: {x: 0.6276541, y: -0.0002503395, z: 0.628233, w: 0.45975387} | 
				
			||||
 | 
					      scale: {x: 0.08000005, y: 0.08000001, z: 0.08000004} | 
				
			||||
 | 
					    - name: left_shoulder2 | 
				
			||||
 | 
					      parentName: left_upper_arm | 
				
			||||
 | 
					      position: {x: 0.023122678, y: 0.03264472, z: 0.08629361} | 
				
			||||
 | 
					      rotation: {x: -0.33152154, y: -0.00000017136335, z: 0.08883171, w: 0.9392563} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: right_upper_arm | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.0065300968, y: 0.3054909, z: -0.028148612} | 
				
			||||
 | 
					      rotation: {x: 0.9821227, y: 0.0047237636, z: 0.14654115, w: -0.118061} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_larm | 
				
			||||
 | 
					      parentName: right_upper_arm | 
				
			||||
 | 
					      position: {x: -0.05019078, y: -0.32017505, z: -0.013448662} | 
				
			||||
 | 
					      rotation: {x: 0.14644656, y: 0.69692343, z: -0.08455098, w: 0.69692343} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hand | 
				
			||||
 | 
					      parentName: right_larm | 
				
			||||
 | 
					      position: {x: -0.00003791973, y: -0.15599604, z: 0.00002259016} | 
				
			||||
 | 
					      rotation: {x: -0.6275729, y: 0.0003462434, z: 0.6282862, w: 0.459792} | 
				
			||||
 | 
					      scale: {x: 0.079999946, y: 0.080000006, z: 0.07999995} | 
				
			||||
 | 
					    - name: right_shoulder2 | 
				
			||||
 | 
					      parentName: right_upper_arm | 
				
			||||
 | 
					      position: {x: 0.018984409, y: 0.021175496, z: -0.07061822} | 
				
			||||
 | 
					      rotation: {x: 0.26393244, y: -0.0016188326, z: 0.07030048, w: 0.9619745} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: Shoulder | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.001, y: -0.001, z: -0.075} | 
				
			||||
 | 
					      rotation: {x: 0.001067541, y: -0.707106, z: 0.707106, w: 0.001067541} | 
				
			||||
 | 
					      scale: {x: 0.050000057, y: 0.05000001, z: 0.3} | 
				
			||||
 | 
					    - name: Spine | 
				
			||||
 | 
					      parentName: butt | 
				
			||||
 | 
					      position: {x: -0.033886682, y: 0.0012130737, z: -0.29749244} | 
				
			||||
 | 
					      rotation: {x: 0.010788803, y: -0.0027317873, z: 0.99953836, w: 0.028269844} | 
				
			||||
 | 
					      scale: {x: 0.05000011, y: 0.05000005, z: 0.6000004} | 
				
			||||
 | 
					    - name: left_thigh | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.022163205, y: 0.8473689, z: -0.09560348} | 
				
			||||
 | 
					      rotation: {x: -0.008197911, y: -0.008591415, z: 0.024315646, w: 0.99963385} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hip_y | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: -0.00018789193, y: 0.00050958304, z: 0.0037600398} | 
				
			||||
 | 
					      rotation: {x: -0.011198115, y: -0.019681891, z: -0.00040819624, w: 0.9997435} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hip_z | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: 0.000009631686, y: 0.00050954695, z: 0.0037639162} | 
				
			||||
 | 
					      rotation: {x: -0.011199301, y: 0.00007027015, z: -0.00004858979, w: 0.9999373} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_shin | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: 0.0069502685, y: -0.38283935, z: -0.006257828} | 
				
			||||
 | 
					      rotation: {x: 0.014698038, y: -0.0003006309, z: 0.020444054, w: 0.9996829} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_left_foot | 
				
			||||
 | 
					      parentName: left_shin | 
				
			||||
 | 
					      position: {x: -0.04318934, y: -0.23842703, z: -0.026194116} | 
				
			||||
 | 
					      rotation: {x: 0.033987474, y: -0.015081191, z: -0.73684585, w: 0.6750375} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_ankle_x | 
				
			||||
 | 
					      parentName: left_left_foot | 
				
			||||
 | 
					      position: {x: 0.0028956856, y: 0.0075475774, z: -0.000414714} | 
				
			||||
 | 
					      rotation: {x: -0.0043921056, y: 0.0034287455, z: 0.046523295, w: 0.99890167} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: left_right_foot | 
				
			||||
 | 
					      parentName: left_left_foot | 
				
			||||
 | 
					      position: {x: -0.012464729, y: 0.005532327, z: 0.21164574} | 
				
			||||
 | 
					      rotation: {x: 0.0533601, y: 0.06701755, z: -0.0019481222, w: 0.99632204} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: LeftLeg__1_ | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: -0.040999997, y: -0.30899996, z: 0.19} | 
				
			||||
 | 
					      rotation: {x: 0.009720462, y: 0.71269727, z: -0.7010641, w: -0.02184826} | 
				
			||||
 | 
					      scale: {x: 0.05000017, y: 0.050000105, z: 0.6000013} | 
				
			||||
 | 
					    - name: right_thigh | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.010520758, y: 0.84846205, z: 0.09885497} | 
				
			||||
 | 
					      rotation: {x: 0.0074896533, y: -0.027545288, z: 0.022941835, w: 0.9993292} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hip_y | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: 0.000021025491, y: 0.0009465131, z: -0.0013828418} | 
				
			||||
 | 
					      rotation: {x: 0.0036728394, y: -0.00037535836, z: -0.00008118107, w: 0.9999932} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hip_z | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: -0.0000000049330993, y: 0.0000052593314, z: -0.0013360521} | 
				
			||||
 | 
					      rotation: {x: 0.003927878, y: 1.3571037e-25, z: -0.000000013460522, w: 0.9999923} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_shin | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: 0.0068513784, y: -0.38295454, z: 0.006241403} | 
				
			||||
 | 
					      rotation: {x: -0.014669814, y: 0.0003177673, z: 0.020145983, w: 0.9996894} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_right_foot | 
				
			||||
 | 
					      parentName: right_shin | 
				
			||||
 | 
					      position: {x: -0.043461975, y: -0.239265, z: 0.02424076} | 
				
			||||
 | 
					      rotation: {x: -0.017235627, y: 0.021577317, z: -0.735891, w: 0.6765366} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_ankle_x | 
				
			||||
 | 
					      parentName: right_right_foot | 
				
			||||
 | 
					      position: {x: 0.0029095989, y: 0.0074111656, z: 0.00041196973} | 
				
			||||
 | 
					      rotation: {x: 0.004348083, y: -0.0036474187, z: 0.04522145, w: 0.9989609} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: right_left_foot | 
				
			||||
 | 
					      parentName: right_right_foot | 
				
			||||
 | 
					      position: {x: -0.003858014, y: 0.01637404, z: -0.21142484} | 
				
			||||
 | 
					      rotation: {x: -0.0532643, y: -0.0675717, z: -0.0010922394, w: 0.99629104} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: RightLeg | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: -0.043, y: -0.316, z: -0.18299998} | 
				
			||||
 | 
					      rotation: {x: 0.004674896, y: -0.701414, z: 0.7119129, w: 0.03430193} | 
				
			||||
 | 
					      scale: {x: 0.05000008, y: 0.05000004, z: 0.6000004} | 
				
			||||
 | 
					    - name: mixamorig:Hips | 
				
			||||
 | 
					      parentName: Backflip(Clone) | 
				
			||||
 | 
					      position: {x: -0.005175761, y: 0.9335466, z: -0.0036196744} | 
				
			||||
 | 
					      rotation: {x: 0.000000008326478, y: 0.71872675, z: -0.000000014373027, w: 0.69529265} | 
				
			||||
 | 
					      scale: {x: 1, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.008040293, y: -0.05244598, z: 0.10175739} | 
				
			||||
 | 
					      rotation: {x: -0.000096233984, y: -0.007695467, z: 0.99989223, w: -0.012503546} | 
				
			||||
 | 
					      scale: {x: 1.0000052, y: 1.0000025, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightLeg | 
				
			||||
 | 
					      parentName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      position: {x: 4.440892e-18, y: 0.4222232, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.019863136, y: 0.0010614229, z: 0.053350624, w: 0.9983777} | 
				
			||||
 | 
					      scale: {x: 1.0000031, y: 1.0000021, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:RightFoot | 
				
			||||
 | 
					      parentName: mixamorig:RightLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.38956782, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.42334923, y: -0.5705113, z: 0.4392357, w: -0.5498767} | 
				
			||||
 | 
					      scale: {x: 1.0000018, y: 1.0000029, z: 1.0000002} | 
				
			||||
 | 
					    - name: mixamorig:RightToeBase | 
				
			||||
 | 
					      parentName: mixamorig:RightFoot | 
				
			||||
 | 
					      position: {x: -0, y: 0.12412127, z: 7.105427e-17} | 
				
			||||
 | 
					      rotation: {x: -0.20302476, y: 0.0002567768, z: 0.0012378544, w: -0.9791728} | 
				
			||||
 | 
					      scale: {x: 1.0000008, y: 0.9999995, z: 1.0000048} | 
				
			||||
 | 
					    - name: mixamorig:RightToe_End | 
				
			||||
 | 
					      parentName: mixamorig:RightToeBase | 
				
			||||
 | 
					      position: {x: -0, y: 0.060296334, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: 0.0035344027, y: -0.05244598, z: -0.10175739} | 
				
			||||
 | 
					      rotation: {x: 0.00008969172, y: 0.007695548, z: 0.9999024, w: -0.011660735} | 
				
			||||
 | 
					      scale: {x: 1.000008, y: 1.0000052, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftLeg | 
				
			||||
 | 
					      parentName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.42220598, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.019789819, y: -0.001283939, z: 0.06472981, w: 0.9977058} | 
				
			||||
 | 
					      scale: {x: 1.0000039, y: 1.000004, z: 1.0000007} | 
				
			||||
 | 
					    - name: mixamorig:LeftFoot | 
				
			||||
 | 
					      parentName: mixamorig:LeftLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.3907465, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.45038655, y: 0.54181254, z: -0.4355745, w: 0.5602374} | 
				
			||||
 | 
					      scale: {x: 1.0000029, y: 1.0000026, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:LeftToeBase | 
				
			||||
 | 
					      parentName: mixamorig:LeftFoot | 
				
			||||
 | 
					      position: {x: -0, y: 0.1308076, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.19264501, y: 0.00046184653, z: 0.002352476, w: 0.9812656} | 
				
			||||
 | 
					      scale: {x: 1.000001, y: 0.99999976, z: 1.0000021} | 
				
			||||
 | 
					    - name: mixamorig:LeftToe_End | 
				
			||||
 | 
					      parentName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      position: {x: -0, y: 0.061049044, z: -3.5527136e-17} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.0024581861, y: 0.094537124, z: 1.110223e-18} | 
				
			||||
 | 
					      rotation: {x: -0.0000000011847465, y: 0.000000027988655, z: 0.012997864, w: 0.99991554} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.9999999, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine1 | 
				
			||||
 | 
					      parentName: mixamorig:Spine | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.1103307, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.000000004352489, y: -0.000000046559435, z: 0.000000027008355, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.9999999, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine2 | 
				
			||||
 | 
					      parentName: mixamorig:Spine1 | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.12609196, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.000000058169196, y: 0.000000018020504, z: -9.31326e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:Neck | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: 0.000000007613613, y: 0.14185366, z: -5.551115e-19} | 
				
			||||
 | 
					      rotation: {x: 0.000000015957266, y: 0.000000016797909, z: -0.012997881, w: 0.99991554} | 
				
			||||
 | 
					      scale: {x: 0.9999999, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Head | 
				
			||||
 | 
					      parentName: mixamorig:Neck | 
				
			||||
 | 
					      position: {x: -0.0008683859, y: 0.053217314, z: 5.551115e-19} | 
				
			||||
 | 
					      rotation: {x: -0.000000007200165, y: 0.0000000015158257, z: -0.000000024214387, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1, z: 1.0000004} | 
				
			||||
 | 
					    - name: mixamorig:HeadTop_End | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: -0.0022724792, y: 0.13926437, z: 1.110223e-18} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: 0.00020240633, y: 0.13515088, z: -0.04127286} | 
				
			||||
 | 
					      rotation: {x: -0.0019427737, y: -0.64387274, z: 0.7651283, w: -0.0016816484} | 
				
			||||
 | 
					      scale: {x: 1.0000032, y: 1.0000012, z: 1.0000011} | 
				
			||||
 | 
					    - name: mixamorig:LeftArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      position: {x: -0, y: 0.0791558, z: 2.842171e-16} | 
				
			||||
 | 
					      rotation: {x: -0.052307434, y: 0.0017309872, z: -0.0049234666, w: 0.9986174} | 
				
			||||
 | 
					      scale: {x: 1.0000021, y: 1.0000029, z: 1.0000021} | 
				
			||||
 | 
					    - name: mixamorig:LeftForeArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftArm | 
				
			||||
 | 
					      position: {x: 4.440892e-18, y: 0.3525264, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.03167211, y: 0.0079971645, z: -0.016885435, w: 0.9993237} | 
				
			||||
 | 
					      scale: {x: 1.0000007, y: 1.0000013, z: 1.0000008} | 
				
			||||
 | 
					    - name: mixamorig:LeftHand | 
				
			||||
 | 
					      parentName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      position: {x: 1.7763568e-17, y: 0.29053873, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0, y: -2.3283064e-10, z: -1.3096724e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000012, y: 1.0000001, z: 0.99999976} | 
				
			||||
 | 
					    - name: mixamorig:RightShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: -0.0005504584, y: 0.13517044, z: 0.04127286} | 
				
			||||
 | 
					      rotation: {x: 0.7649505, y: -0.004635785, z: 0.005321747, w: 0.6440504} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000006, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:RightArm | 
				
			||||
 | 
					      parentName: mixamorig:RightShoulder | 
				
			||||
 | 
					      position: {x: -0, y: 0.079155795, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.04782623, y: -0.0011201247, z: 0.016020544, w: 0.9987266} | 
				
			||||
 | 
					      scale: {x: 0.9999999, y: 1.0000025, z: 1.0000014} | 
				
			||||
 | 
					    - name: mixamorig:RightForeArm | 
				
			||||
 | 
					      parentName: mixamorig:RightArm | 
				
			||||
 | 
					      position: {x: -0, y: 0.3522625, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.03519323, y: -0.0078160325, z: 0.030223342, w: 0.99889284} | 
				
			||||
 | 
					      scale: {x: 1.0000007, y: 1.0000008, z: 1.0000008} | 
				
			||||
 | 
					    - name: mixamorig:RightHand | 
				
			||||
 | 
					      parentName: mixamorig:RightForeArm | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.2879794, z: 2.842171e-16} | 
				
			||||
 | 
					      rotation: {x: -0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000005, z: 1.0000005} | 
				
			||||
 | 
					    armTwist: 0.5 | 
				
			||||
 | 
					    foreArmTwist: 0.5 | 
				
			||||
 | 
					    upperLegTwist: 0.5 | 
				
			||||
 | 
					    legTwist: 0.5 | 
				
			||||
 | 
					    armStretch: 0.05 | 
				
			||||
 | 
					    legStretch: 0.05 | 
				
			||||
 | 
					    feetSpacing: 0 | 
				
			||||
 | 
					    globalScale: 1 | 
				
			||||
 | 
					    rootMotionBoneName:  | 
				
			||||
 | 
					    hasTranslationDoF: 0 | 
				
			||||
 | 
					    hasExtraRoot: 1 | 
				
			||||
 | 
					    skeletonHasParents: 1 | 
				
			||||
 | 
					  lastHumanDescriptionAvatarSource: {fileID: 9000000, guid: fa0773caae34843268db7f12c1421ce5, | 
				
			||||
 | 
					    type: 3} | 
				
			||||
 | 
					  autoGenerateAvatarMappingIfUnspecified: 1 | 
				
			||||
 | 
					  animationType: 3 | 
				
			||||
 | 
					  humanoidOversampling: 1 | 
				
			||||
 | 
					  avatarSetup: 2 | 
				
			||||
 | 
					  addHumanoidExtraRootOnlyWhenUsingAvatar: 0 | 
				
			||||
 | 
					  additionalBone: 0 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									Binary file not shown.
								
							
						
					@ -0,0 +1,705 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 9c569166600d641efacce54b9444fdd9 | 
				
			||||
 | 
					ModelImporter: | 
				
			||||
 | 
					  serializedVersion: 23 | 
				
			||||
 | 
					  fileIDToRecycleName: | 
				
			||||
 | 
					    100000: //RootNode | 
				
			||||
 | 
					    100002: mixamorig:Head | 
				
			||||
 | 
					    100004: mixamorig:HeadTop_End | 
				
			||||
 | 
					    100006: mixamorig:Hips | 
				
			||||
 | 
					    100008: mixamorig:LeftArm | 
				
			||||
 | 
					    100010: mixamorig:LeftFoot | 
				
			||||
 | 
					    100012: mixamorig:LeftForeArm | 
				
			||||
 | 
					    100014: mixamorig:LeftHand | 
				
			||||
 | 
					    100016: mixamorig:LeftLeg | 
				
			||||
 | 
					    100018: mixamorig:LeftShoulder | 
				
			||||
 | 
					    100020: mixamorig:LeftToe_End | 
				
			||||
 | 
					    100022: mixamorig:LeftToeBase | 
				
			||||
 | 
					    100024: mixamorig:LeftUpLeg | 
				
			||||
 | 
					    100026: mixamorig:Neck | 
				
			||||
 | 
					    100028: mixamorig:RightArm | 
				
			||||
 | 
					    100030: mixamorig:RightFoot | 
				
			||||
 | 
					    100032: mixamorig:RightForeArm | 
				
			||||
 | 
					    100034: mixamorig:RightHand | 
				
			||||
 | 
					    100036: mixamorig:RightLeg | 
				
			||||
 | 
					    100038: mixamorig:RightShoulder | 
				
			||||
 | 
					    100040: mixamorig:RightToe_End | 
				
			||||
 | 
					    100042: mixamorig:RightToeBase | 
				
			||||
 | 
					    100044: mixamorig:RightUpLeg | 
				
			||||
 | 
					    100046: mixamorig:Spine | 
				
			||||
 | 
					    100048: mixamorig:Spine1 | 
				
			||||
 | 
					    100050: mixamorig:Spine2 | 
				
			||||
 | 
					    400000: //RootNode | 
				
			||||
 | 
					    400002: mixamorig:Head | 
				
			||||
 | 
					    400004: mixamorig:HeadTop_End | 
				
			||||
 | 
					    400006: mixamorig:Hips | 
				
			||||
 | 
					    400008: mixamorig:LeftArm | 
				
			||||
 | 
					    400010: mixamorig:LeftFoot | 
				
			||||
 | 
					    400012: mixamorig:LeftForeArm | 
				
			||||
 | 
					    400014: mixamorig:LeftHand | 
				
			||||
 | 
					    400016: mixamorig:LeftLeg | 
				
			||||
 | 
					    400018: mixamorig:LeftShoulder | 
				
			||||
 | 
					    400020: mixamorig:LeftToe_End | 
				
			||||
 | 
					    400022: mixamorig:LeftToeBase | 
				
			||||
 | 
					    400024: mixamorig:LeftUpLeg | 
				
			||||
 | 
					    400026: mixamorig:Neck | 
				
			||||
 | 
					    400028: mixamorig:RightArm | 
				
			||||
 | 
					    400030: mixamorig:RightFoot | 
				
			||||
 | 
					    400032: mixamorig:RightForeArm | 
				
			||||
 | 
					    400034: mixamorig:RightHand | 
				
			||||
 | 
					    400036: mixamorig:RightLeg | 
				
			||||
 | 
					    400038: mixamorig:RightShoulder | 
				
			||||
 | 
					    400040: mixamorig:RightToe_End | 
				
			||||
 | 
					    400042: mixamorig:RightToeBase | 
				
			||||
 | 
					    400044: mixamorig:RightUpLeg | 
				
			||||
 | 
					    400046: mixamorig:Spine | 
				
			||||
 | 
					    400048: mixamorig:Spine1 | 
				
			||||
 | 
					    400050: mixamorig:Spine2 | 
				
			||||
 | 
					    7400000: jump | 
				
			||||
 | 
					    7400002: jumpLaunch | 
				
			||||
 | 
					    7400004: jumpFalling | 
				
			||||
 | 
					    9500000: //RootNode | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  materials: | 
				
			||||
 | 
					    importMaterials: 1 | 
				
			||||
 | 
					    materialName: 0 | 
				
			||||
 | 
					    materialSearch: 1 | 
				
			||||
 | 
					    materialLocation: 1 | 
				
			||||
 | 
					  animations: | 
				
			||||
 | 
					    legacyGenerateAnimations: 4 | 
				
			||||
 | 
					    bakeSimulation: 0 | 
				
			||||
 | 
					    resampleCurves: 1 | 
				
			||||
 | 
					    optimizeGameObjects: 0 | 
				
			||||
 | 
					    motionNodeName:  | 
				
			||||
 | 
					    rigImportErrors:  | 
				
			||||
 | 
					    rigImportWarnings:  | 
				
			||||
 | 
					    animationImportErrors:  | 
				
			||||
 | 
					    animationImportWarnings:  | 
				
			||||
 | 
					    animationRetargetingWarnings:  | 
				
			||||
 | 
					    animationDoRetargetingWarnings: 0 | 
				
			||||
 | 
					    importAnimatedCustomProperties: 0 | 
				
			||||
 | 
					    importConstraints: 0 | 
				
			||||
 | 
					    animationCompression: 3 | 
				
			||||
 | 
					    animationRotationError: 0.5 | 
				
			||||
 | 
					    animationPositionError: 0.5 | 
				
			||||
 | 
					    animationScaleError: 0.5 | 
				
			||||
 | 
					    animationWrapMode: 0 | 
				
			||||
 | 
					    extraExposedTransformPaths: [] | 
				
			||||
 | 
					    extraUserProperties: [] | 
				
			||||
 | 
					    clipAnimations: | 
				
			||||
 | 
					    - serializedVersion: 16 | 
				
			||||
 | 
					      name: jump | 
				
			||||
 | 
					      takeName: mixamo.com | 
				
			||||
 | 
					      firstFrame: 0 | 
				
			||||
 | 
					      lastFrame: 130 | 
				
			||||
 | 
					      wrapMode: 0 | 
				
			||||
 | 
					      orientationOffsetY: 0 | 
				
			||||
 | 
					      level: 0.07 | 
				
			||||
 | 
					      cycleOffset: 0 | 
				
			||||
 | 
					      loop: 0 | 
				
			||||
 | 
					      hasAdditiveReferencePose: 0 | 
				
			||||
 | 
					      loopTime: 0 | 
				
			||||
 | 
					      loopBlend: 0 | 
				
			||||
 | 
					      loopBlendOrientation: 1 | 
				
			||||
 | 
					      loopBlendPositionY: 1 | 
				
			||||
 | 
					      loopBlendPositionXZ: 0 | 
				
			||||
 | 
					      keepOriginalOrientation: 1 | 
				
			||||
 | 
					      keepOriginalPositionY: 0 | 
				
			||||
 | 
					      keepOriginalPositionXZ: 0 | 
				
			||||
 | 
					      heightFromFeet: 1 | 
				
			||||
 | 
					      mirror: 0 | 
				
			||||
 | 
					      bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 | 
				
			||||
 | 
					      curves: [] | 
				
			||||
 | 
					      events: [] | 
				
			||||
 | 
					      transformMask: [] | 
				
			||||
 | 
					      maskType: 3 | 
				
			||||
 | 
					      maskSource: {instanceID: 0} | 
				
			||||
 | 
					      additiveReferencePoseFrame: 0 | 
				
			||||
 | 
					    - serializedVersion: 16 | 
				
			||||
 | 
					      name: jumpLaunch | 
				
			||||
 | 
					      takeName: mixamo.com | 
				
			||||
 | 
					      firstFrame: 53 | 
				
			||||
 | 
					      lastFrame: 70 | 
				
			||||
 | 
					      wrapMode: 0 | 
				
			||||
 | 
					      orientationOffsetY: 0 | 
				
			||||
 | 
					      level: 0.07 | 
				
			||||
 | 
					      cycleOffset: 0 | 
				
			||||
 | 
					      loop: 0 | 
				
			||||
 | 
					      hasAdditiveReferencePose: 0 | 
				
			||||
 | 
					      loopTime: 1 | 
				
			||||
 | 
					      loopBlend: 1 | 
				
			||||
 | 
					      loopBlendOrientation: 1 | 
				
			||||
 | 
					      loopBlendPositionY: 1 | 
				
			||||
 | 
					      loopBlendPositionXZ: 1 | 
				
			||||
 | 
					      keepOriginalOrientation: 0 | 
				
			||||
 | 
					      keepOriginalPositionY: 0 | 
				
			||||
 | 
					      keepOriginalPositionXZ: 1 | 
				
			||||
 | 
					      heightFromFeet: 1 | 
				
			||||
 | 
					      mirror: 0 | 
				
			||||
 | 
					      bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 | 
				
			||||
 | 
					      curves: [] | 
				
			||||
 | 
					      events: [] | 
				
			||||
 | 
					      transformMask: [] | 
				
			||||
 | 
					      maskType: 3 | 
				
			||||
 | 
					      maskSource: {instanceID: 0} | 
				
			||||
 | 
					      additiveReferencePoseFrame: 0 | 
				
			||||
 | 
					    - serializedVersion: 16 | 
				
			||||
 | 
					      name: jumpFalling | 
				
			||||
 | 
					      takeName: mixamo.com | 
				
			||||
 | 
					      firstFrame: 70 | 
				
			||||
 | 
					      lastFrame: 86 | 
				
			||||
 | 
					      wrapMode: 0 | 
				
			||||
 | 
					      orientationOffsetY: 0 | 
				
			||||
 | 
					      level: 0.07 | 
				
			||||
 | 
					      cycleOffset: 0 | 
				
			||||
 | 
					      loop: 0 | 
				
			||||
 | 
					      hasAdditiveReferencePose: 0 | 
				
			||||
 | 
					      loopTime: 0 | 
				
			||||
 | 
					      loopBlend: 0 | 
				
			||||
 | 
					      loopBlendOrientation: 1 | 
				
			||||
 | 
					      loopBlendPositionY: 1 | 
				
			||||
 | 
					      loopBlendPositionXZ: 1 | 
				
			||||
 | 
					      keepOriginalOrientation: 0 | 
				
			||||
 | 
					      keepOriginalPositionY: 0 | 
				
			||||
 | 
					      keepOriginalPositionXZ: 1 | 
				
			||||
 | 
					      heightFromFeet: 1 | 
				
			||||
 | 
					      mirror: 0 | 
				
			||||
 | 
					      bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 | 
				
			||||
 | 
					      curves: [] | 
				
			||||
 | 
					      events: [] | 
				
			||||
 | 
					      transformMask: [] | 
				
			||||
 | 
					      maskType: 3 | 
				
			||||
 | 
					      maskSource: {instanceID: 0} | 
				
			||||
 | 
					      additiveReferencePoseFrame: 0 | 
				
			||||
 | 
					    isReadable: 1 | 
				
			||||
 | 
					  meshes: | 
				
			||||
 | 
					    lODScreenPercentages: [] | 
				
			||||
 | 
					    globalScale: 1 | 
				
			||||
 | 
					    meshCompression: 0 | 
				
			||||
 | 
					    addColliders: 0 | 
				
			||||
 | 
					    useSRGBMaterialColor: 1 | 
				
			||||
 | 
					    importVisibility: 1 | 
				
			||||
 | 
					    importBlendShapes: 1 | 
				
			||||
 | 
					    importCameras: 1 | 
				
			||||
 | 
					    importLights: 1 | 
				
			||||
 | 
					    swapUVChannels: 0 | 
				
			||||
 | 
					    generateSecondaryUV: 0 | 
				
			||||
 | 
					    useFileUnits: 1 | 
				
			||||
 | 
					    optimizeMeshForGPU: 1 | 
				
			||||
 | 
					    keepQuads: 0 | 
				
			||||
 | 
					    weldVertices: 1 | 
				
			||||
 | 
					    preserveHierarchy: 0 | 
				
			||||
 | 
					    indexFormat: 0 | 
				
			||||
 | 
					    secondaryUVAngleDistortion: 8 | 
				
			||||
 | 
					    secondaryUVAreaDistortion: 15.000001 | 
				
			||||
 | 
					    secondaryUVHardAngle: 88 | 
				
			||||
 | 
					    secondaryUVPackMargin: 4 | 
				
			||||
 | 
					    useFileScale: 1 | 
				
			||||
 | 
					    previousCalculatedGlobalScale: 0.01 | 
				
			||||
 | 
					    hasPreviousCalculatedGlobalScale: 1 | 
				
			||||
 | 
					  tangentSpace: | 
				
			||||
 | 
					    normalSmoothAngle: 60 | 
				
			||||
 | 
					    normalImportMode: 0 | 
				
			||||
 | 
					    tangentImportMode: 3 | 
				
			||||
 | 
					    normalCalculationMode: 4 | 
				
			||||
 | 
					    legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 | 
				
			||||
 | 
					    blendShapeNormalImportMode: 1 | 
				
			||||
 | 
					    normalSmoothingSource: 0 | 
				
			||||
 | 
					  importAnimation: 1 | 
				
			||||
 | 
					  copyAvatar: 1 | 
				
			||||
 | 
					  humanDescription: | 
				
			||||
 | 
					    serializedVersion: 2 | 
				
			||||
 | 
					    human: | 
				
			||||
 | 
					    - boneName: mixamorig:Hips | 
				
			||||
 | 
					      humanName: Hips | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      humanName: LeftUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      humanName: RightUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftLeg | 
				
			||||
 | 
					      humanName: LeftLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightLeg | 
				
			||||
 | 
					      humanName: RightLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftFoot | 
				
			||||
 | 
					      humanName: LeftFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightFoot | 
				
			||||
 | 
					      humanName: RightFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine | 
				
			||||
 | 
					      humanName: Spine | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine1 | 
				
			||||
 | 
					      humanName: Chest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Neck | 
				
			||||
 | 
					      humanName: Neck | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Head | 
				
			||||
 | 
					      humanName: Head | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      humanName: LeftShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightShoulder | 
				
			||||
 | 
					      humanName: RightShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftArm | 
				
			||||
 | 
					      humanName: LeftUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightArm | 
				
			||||
 | 
					      humanName: RightUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      humanName: LeftLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightForeArm | 
				
			||||
 | 
					      humanName: RightLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHand | 
				
			||||
 | 
					      humanName: LeftHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHand | 
				
			||||
 | 
					      humanName: RightHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      humanName: LeftToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightToeBase | 
				
			||||
 | 
					      humanName: RightToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine2 | 
				
			||||
 | 
					      humanName: UpperChest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    skeleton: | 
				
			||||
 | 
					    - name: Backflip(Clone) | 
				
			||||
 | 
					      parentName:  | 
				
			||||
 | 
					      position: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: 0, z: 0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: humanoidT | 
				
			||||
 | 
					      parentName: Backflip(Clone) | 
				
			||||
 | 
					      position: {x: -0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: butt | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.028619736, y: 1.0587679, z: 0.002142583} | 
				
			||||
 | 
					      rotation: {x: 0.7049101, y: -0.026212664, z: 0.013773171, w: 0.70867836} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: lower_waist | 
				
			||||
 | 
					      parentName: butt | 
				
			||||
 | 
					      position: {x: -0.021319339, y: 0.00040355325, z: -0.16483356} | 
				
			||||
 | 
					      rotation: {x: 0.0031044185, y: 0.0020000096, z: -0.000018799677, w: 0.9999932} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: abdomen_y | 
				
			||||
 | 
					      parentName: lower_waist | 
				
			||||
 | 
					      position: {x: -0.0000723721, y: 0.000012806966, z: -0.0017823265} | 
				
			||||
 | 
					      rotation: {x: 0.00014829637, y: 0.0018769234, z: -0.02827898, w: 0.9995983} | 
				
			||||
 | 
					      scale: {x: 1, y: 1.0000005, z: 1.0000002} | 
				
			||||
 | 
					    - name: upper_waist | 
				
			||||
 | 
					      parentName: lower_waist | 
				
			||||
 | 
					      position: {x: -0.0019383731, y: 0.00014567096, z: -0.14226863} | 
				
			||||
 | 
					      rotation: {x: -0.0004889473, y: 0.007208624, z: -0.028266912, w: 0.9995743} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: torso | 
				
			||||
 | 
					      parentName: upper_waist | 
				
			||||
 | 
					      position: {x: -0.010000003, y: 0, z: -0.12} | 
				
			||||
 | 
					      rotation: {x: -0, y: -0, z: 5.134097e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: head | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: 0.00012124982, y: -0.00066340127, z: -0.20378074} | 
				
			||||
 | 
					      rotation: {x: -0.7070211, y: -0.00034404645, z: -0.00035778637, w: 0.70719224} | 
				
			||||
 | 
					      scale: {x: 0.18, y: 0.18000005, z: 0.18000005} | 
				
			||||
 | 
					    - name: left_upper_arm | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.00805471, y: -0.3095426, z: -0.046386097} | 
				
			||||
 | 
					      rotation: {x: -0.050138354, y: -0.15586165, z: -0.020825602, w: 0.9862858} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_larm | 
				
			||||
 | 
					      parentName: left_upper_arm | 
				
			||||
 | 
					      position: {x: -0.05012562, y: -0.3203213, z: 0.013551146} | 
				
			||||
 | 
					      rotation: {x: -0.1464947, y: -0.69702035, z: -0.08435819, w: 0.6968398} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hand | 
				
			||||
 | 
					      parentName: left_larm | 
				
			||||
 | 
					      position: {x: -0.000015493482, y: -0.15598094, z: -0.000019282103} | 
				
			||||
 | 
					      rotation: {x: 0.6276541, y: -0.0002503395, z: 0.628233, w: 0.45975387} | 
				
			||||
 | 
					      scale: {x: 0.08000005, y: 0.08000001, z: 0.08000004} | 
				
			||||
 | 
					    - name: left_shoulder2 | 
				
			||||
 | 
					      parentName: left_upper_arm | 
				
			||||
 | 
					      position: {x: 0.023122678, y: 0.03264472, z: 0.08629361} | 
				
			||||
 | 
					      rotation: {x: -0.33152154, y: -0.00000017136335, z: 0.08883171, w: 0.9392563} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: right_upper_arm | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.0065300968, y: 0.3054909, z: -0.028148612} | 
				
			||||
 | 
					      rotation: {x: 0.9821227, y: 0.0047237636, z: 0.14654115, w: -0.118061} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_larm | 
				
			||||
 | 
					      parentName: right_upper_arm | 
				
			||||
 | 
					      position: {x: -0.05019078, y: -0.32017505, z: -0.013448662} | 
				
			||||
 | 
					      rotation: {x: 0.14644656, y: 0.69692343, z: -0.08455098, w: 0.69692343} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hand | 
				
			||||
 | 
					      parentName: right_larm | 
				
			||||
 | 
					      position: {x: -0.00003791973, y: -0.15599604, z: 0.00002259016} | 
				
			||||
 | 
					      rotation: {x: -0.6275729, y: 0.0003462434, z: 0.6282862, w: 0.459792} | 
				
			||||
 | 
					      scale: {x: 0.079999946, y: 0.080000006, z: 0.07999995} | 
				
			||||
 | 
					    - name: right_shoulder2 | 
				
			||||
 | 
					      parentName: right_upper_arm | 
				
			||||
 | 
					      position: {x: 0.018984409, y: 0.021175496, z: -0.07061822} | 
				
			||||
 | 
					      rotation: {x: 0.26393244, y: -0.0016188326, z: 0.07030048, w: 0.9619745} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: Shoulder | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.001, y: -0.001, z: -0.075} | 
				
			||||
 | 
					      rotation: {x: 0.001067541, y: -0.707106, z: 0.707106, w: 0.001067541} | 
				
			||||
 | 
					      scale: {x: 0.050000057, y: 0.05000001, z: 0.3} | 
				
			||||
 | 
					    - name: Spine | 
				
			||||
 | 
					      parentName: butt | 
				
			||||
 | 
					      position: {x: -0.033886682, y: 0.0012130737, z: -0.29749244} | 
				
			||||
 | 
					      rotation: {x: 0.010788803, y: -0.0027317873, z: 0.99953836, w: 0.028269844} | 
				
			||||
 | 
					      scale: {x: 0.05000011, y: 0.05000005, z: 0.6000004} | 
				
			||||
 | 
					    - name: left_thigh | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.022163205, y: 0.8473689, z: -0.09560348} | 
				
			||||
 | 
					      rotation: {x: -0.008197911, y: -0.008591415, z: 0.024315646, w: 0.99963385} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hip_y | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: -0.00018789193, y: 0.00050958304, z: 0.0037600398} | 
				
			||||
 | 
					      rotation: {x: -0.011198115, y: -0.019681891, z: -0.00040819624, w: 0.9997435} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hip_z | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: 0.000009631686, y: 0.00050954695, z: 0.0037639162} | 
				
			||||
 | 
					      rotation: {x: -0.011199301, y: 0.00007027015, z: -0.00004858979, w: 0.9999373} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_shin | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: 0.0069502685, y: -0.38283935, z: -0.006257828} | 
				
			||||
 | 
					      rotation: {x: 0.014698038, y: -0.0003006309, z: 0.020444054, w: 0.9996829} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_left_foot | 
				
			||||
 | 
					      parentName: left_shin | 
				
			||||
 | 
					      position: {x: -0.04318934, y: -0.23842703, z: -0.026194116} | 
				
			||||
 | 
					      rotation: {x: 0.033987474, y: -0.015081191, z: -0.73684585, w: 0.6750375} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_ankle_x | 
				
			||||
 | 
					      parentName: left_left_foot | 
				
			||||
 | 
					      position: {x: 0.0028956856, y: 0.0075475774, z: -0.000414714} | 
				
			||||
 | 
					      rotation: {x: -0.0043921056, y: 0.0034287455, z: 0.046523295, w: 0.99890167} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: left_right_foot | 
				
			||||
 | 
					      parentName: left_left_foot | 
				
			||||
 | 
					      position: {x: -0.012464729, y: 0.005532327, z: 0.21164574} | 
				
			||||
 | 
					      rotation: {x: 0.0533601, y: 0.06701755, z: -0.0019481222, w: 0.99632204} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: LeftLeg__1_ | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: -0.040999997, y: -0.30899996, z: 0.19} | 
				
			||||
 | 
					      rotation: {x: 0.009720462, y: 0.71269727, z: -0.7010641, w: -0.02184826} | 
				
			||||
 | 
					      scale: {x: 0.05000017, y: 0.050000105, z: 0.6000013} | 
				
			||||
 | 
					    - name: right_thigh | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.010520758, y: 0.84846205, z: 0.09885497} | 
				
			||||
 | 
					      rotation: {x: 0.0074896533, y: -0.027545288, z: 0.022941835, w: 0.9993292} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hip_y | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: 0.000021025491, y: 0.0009465131, z: -0.0013828418} | 
				
			||||
 | 
					      rotation: {x: 0.0036728394, y: -0.00037535836, z: -0.00008118107, w: 0.9999932} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hip_z | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: -0.0000000049330993, y: 0.0000052593314, z: -0.0013360521} | 
				
			||||
 | 
					      rotation: {x: 0.003927878, y: 1.3571037e-25, z: -0.000000013460522, w: 0.9999923} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_shin | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: 0.0068513784, y: -0.38295454, z: 0.006241403} | 
				
			||||
 | 
					      rotation: {x: -0.014669814, y: 0.0003177673, z: 0.020145983, w: 0.9996894} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_right_foot | 
				
			||||
 | 
					      parentName: right_shin | 
				
			||||
 | 
					      position: {x: -0.043461975, y: -0.239265, z: 0.02424076} | 
				
			||||
 | 
					      rotation: {x: -0.017235627, y: 0.021577317, z: -0.735891, w: 0.6765366} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_ankle_x | 
				
			||||
 | 
					      parentName: right_right_foot | 
				
			||||
 | 
					      position: {x: 0.0029095989, y: 0.0074111656, z: 0.00041196973} | 
				
			||||
 | 
					      rotation: {x: 0.004348083, y: -0.0036474187, z: 0.04522145, w: 0.9989609} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: right_left_foot | 
				
			||||
 | 
					      parentName: right_right_foot | 
				
			||||
 | 
					      position: {x: -0.003858014, y: 0.01637404, z: -0.21142484} | 
				
			||||
 | 
					      rotation: {x: -0.0532643, y: -0.0675717, z: -0.0010922394, w: 0.99629104} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: RightLeg | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: -0.043, y: -0.316, z: -0.18299998} | 
				
			||||
 | 
					      rotation: {x: 0.004674896, y: -0.701414, z: 0.7119129, w: 0.03430193} | 
				
			||||
 | 
					      scale: {x: 0.05000008, y: 0.05000004, z: 0.6000004} | 
				
			||||
 | 
					    - name: mixamorig:Hips | 
				
			||||
 | 
					      parentName: Backflip(Clone) | 
				
			||||
 | 
					      position: {x: -0.005175761, y: 0.9335466, z: -0.0036196744} | 
				
			||||
 | 
					      rotation: {x: 0.000000008326478, y: 0.71872675, z: -0.000000014373027, w: 0.69529265} | 
				
			||||
 | 
					      scale: {x: 1, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.008040293, y: -0.05244598, z: 0.10175739} | 
				
			||||
 | 
					      rotation: {x: -0.000096233984, y: -0.007695467, z: 0.99989223, w: -0.012503546} | 
				
			||||
 | 
					      scale: {x: 1.0000052, y: 1.0000025, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightLeg | 
				
			||||
 | 
					      parentName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      position: {x: 4.440892e-18, y: 0.4222232, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.019863136, y: 0.0010614229, z: 0.053350624, w: 0.9983777} | 
				
			||||
 | 
					      scale: {x: 1.0000031, y: 1.0000021, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:RightFoot | 
				
			||||
 | 
					      parentName: mixamorig:RightLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.38956782, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.42334923, y: -0.5705113, z: 0.4392357, w: -0.5498767} | 
				
			||||
 | 
					      scale: {x: 1.0000018, y: 1.0000029, z: 1.0000002} | 
				
			||||
 | 
					    - name: mixamorig:RightToeBase | 
				
			||||
 | 
					      parentName: mixamorig:RightFoot | 
				
			||||
 | 
					      position: {x: -0, y: 0.12412127, z: 7.105427e-17} | 
				
			||||
 | 
					      rotation: {x: -0.20302476, y: 0.0002567768, z: 0.0012378544, w: -0.9791728} | 
				
			||||
 | 
					      scale: {x: 1.0000008, y: 0.9999995, z: 1.0000048} | 
				
			||||
 | 
					    - name: mixamorig:RightToe_End | 
				
			||||
 | 
					      parentName: mixamorig:RightToeBase | 
				
			||||
 | 
					      position: {x: -0, y: 0.060296334, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: 0.0035344027, y: -0.05244598, z: -0.10175739} | 
				
			||||
 | 
					      rotation: {x: 0.00008969172, y: 0.007695548, z: 0.9999024, w: -0.011660735} | 
				
			||||
 | 
					      scale: {x: 1.000008, y: 1.0000052, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftLeg | 
				
			||||
 | 
					      parentName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.42220598, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.019789819, y: -0.001283939, z: 0.06472981, w: 0.9977058} | 
				
			||||
 | 
					      scale: {x: 1.0000039, y: 1.000004, z: 1.0000007} | 
				
			||||
 | 
					    - name: mixamorig:LeftFoot | 
				
			||||
 | 
					      parentName: mixamorig:LeftLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.3907465, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.45038655, y: 0.54181254, z: -0.4355745, w: 0.5602374} | 
				
			||||
 | 
					      scale: {x: 1.0000029, y: 1.0000026, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:LeftToeBase | 
				
			||||
 | 
					      parentName: mixamorig:LeftFoot | 
				
			||||
 | 
					      position: {x: -0, y: 0.1308076, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.19264501, y: 0.00046184653, z: 0.002352476, w: 0.9812656} | 
				
			||||
 | 
					      scale: {x: 1.000001, y: 0.99999976, z: 1.0000021} | 
				
			||||
 | 
					    - name: mixamorig:LeftToe_End | 
				
			||||
 | 
					      parentName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      position: {x: -0, y: 0.061049044, z: -3.5527136e-17} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.0024581861, y: 0.094537124, z: 1.110223e-18} | 
				
			||||
 | 
					      rotation: {x: -0.0000000011847465, y: 0.000000027988655, z: 0.012997864, w: 0.99991554} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.9999999, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine1 | 
				
			||||
 | 
					      parentName: mixamorig:Spine | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.1103307, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.000000004352489, y: -0.000000046559435, z: 0.000000027008355, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.9999999, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine2 | 
				
			||||
 | 
					      parentName: mixamorig:Spine1 | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.12609196, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.000000058169196, y: 0.000000018020504, z: -9.31326e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:Neck | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: 0.000000007613613, y: 0.14185366, z: -5.551115e-19} | 
				
			||||
 | 
					      rotation: {x: 0.000000015957266, y: 0.000000016797909, z: -0.012997881, w: 0.99991554} | 
				
			||||
 | 
					      scale: {x: 0.9999999, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Head | 
				
			||||
 | 
					      parentName: mixamorig:Neck | 
				
			||||
 | 
					      position: {x: -0.0008683859, y: 0.053217314, z: 5.551115e-19} | 
				
			||||
 | 
					      rotation: {x: -0.000000007200165, y: 0.0000000015158257, z: -0.000000024214387, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1, z: 1.0000004} | 
				
			||||
 | 
					    - name: mixamorig:HeadTop_End | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: -0.0022724792, y: 0.13926437, z: 1.110223e-18} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: 0.00020240633, y: 0.13515088, z: -0.04127286} | 
				
			||||
 | 
					      rotation: {x: -0.0019427737, y: -0.64387274, z: 0.7651283, w: -0.0016816484} | 
				
			||||
 | 
					      scale: {x: 1.0000032, y: 1.0000012, z: 1.0000011} | 
				
			||||
 | 
					    - name: mixamorig:LeftArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      position: {x: -0, y: 0.0791558, z: 2.842171e-16} | 
				
			||||
 | 
					      rotation: {x: -0.052307434, y: 0.0017309872, z: -0.0049234666, w: 0.9986174} | 
				
			||||
 | 
					      scale: {x: 1.0000021, y: 1.0000029, z: 1.0000021} | 
				
			||||
 | 
					    - name: mixamorig:LeftForeArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftArm | 
				
			||||
 | 
					      position: {x: 4.440892e-18, y: 0.3525264, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.03167211, y: 0.0079971645, z: -0.016885435, w: 0.9993237} | 
				
			||||
 | 
					      scale: {x: 1.0000007, y: 1.0000013, z: 1.0000008} | 
				
			||||
 | 
					    - name: mixamorig:LeftHand | 
				
			||||
 | 
					      parentName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      position: {x: 1.7763568e-17, y: 0.29053873, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0, y: -2.3283064e-10, z: -1.3096724e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000012, y: 1.0000001, z: 0.99999976} | 
				
			||||
 | 
					    - name: mixamorig:RightShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: -0.0005504584, y: 0.13517044, z: 0.04127286} | 
				
			||||
 | 
					      rotation: {x: 0.7649505, y: -0.004635785, z: 0.005321747, w: 0.6440504} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000006, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:RightArm | 
				
			||||
 | 
					      parentName: mixamorig:RightShoulder | 
				
			||||
 | 
					      position: {x: -0, y: 0.079155795, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.04782623, y: -0.0011201247, z: 0.016020544, w: 0.9987266} | 
				
			||||
 | 
					      scale: {x: 0.9999999, y: 1.0000025, z: 1.0000014} | 
				
			||||
 | 
					    - name: mixamorig:RightForeArm | 
				
			||||
 | 
					      parentName: mixamorig:RightArm | 
				
			||||
 | 
					      position: {x: -0, y: 0.3522625, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.03519323, y: -0.0078160325, z: 0.030223342, w: 0.99889284} | 
				
			||||
 | 
					      scale: {x: 1.0000007, y: 1.0000008, z: 1.0000008} | 
				
			||||
 | 
					    - name: mixamorig:RightHand | 
				
			||||
 | 
					      parentName: mixamorig:RightForeArm | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.2879794, z: 2.842171e-16} | 
				
			||||
 | 
					      rotation: {x: -0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000005, z: 1.0000005} | 
				
			||||
 | 
					    armTwist: 0.5 | 
				
			||||
 | 
					    foreArmTwist: 0.5 | 
				
			||||
 | 
					    upperLegTwist: 0.5 | 
				
			||||
 | 
					    legTwist: 0.5 | 
				
			||||
 | 
					    armStretch: 0.05 | 
				
			||||
 | 
					    legStretch: 0.05 | 
				
			||||
 | 
					    feetSpacing: 0 | 
				
			||||
 | 
					    rootMotionBoneName:  | 
				
			||||
 | 
					    hasTranslationDoF: 0 | 
				
			||||
 | 
					    hasExtraRoot: 1 | 
				
			||||
 | 
					    skeletonHasParents: 1 | 
				
			||||
 | 
					  lastHumanDescriptionAvatarSource: {fileID: 9000000, guid: fa0773caae34843268db7f12c1421ce5, | 
				
			||||
 | 
					    type: 3} | 
				
			||||
 | 
					  animationType: 3 | 
				
			||||
 | 
					  humanoidOversampling: 1 | 
				
			||||
 | 
					  additionalBone: 0 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
								
									Binary file not shown.
								
							
						
					@ -0,0 +1,647 @@ | 
				
			|||||
 | 
					fileFormatVersion: 2 | 
				
			||||
 | 
					guid: 7cebe89af92024b3aa1f5ca92436b252 | 
				
			||||
 | 
					ModelImporter: | 
				
			||||
 | 
					  serializedVersion: 23 | 
				
			||||
 | 
					  fileIDToRecycleName: | 
				
			||||
 | 
					    100000: mixamorig:Head | 
				
			||||
 | 
					    100002: mixamorig:HeadTop_End | 
				
			||||
 | 
					    100004: mixamorig:Hips | 
				
			||||
 | 
					    100006: mixamorig:LeftArm | 
				
			||||
 | 
					    100008: mixamorig:LeftFoot | 
				
			||||
 | 
					    100010: mixamorig:LeftForeArm | 
				
			||||
 | 
					    100012: mixamorig:LeftHand | 
				
			||||
 | 
					    100014: mixamorig:LeftLeg | 
				
			||||
 | 
					    100016: mixamorig:LeftShoulder | 
				
			||||
 | 
					    100018: mixamorig:LeftToe_End | 
				
			||||
 | 
					    100020: mixamorig:LeftToeBase | 
				
			||||
 | 
					    100022: mixamorig:LeftUpLeg | 
				
			||||
 | 
					    100024: mixamorig:Neck | 
				
			||||
 | 
					    100026: mixamorig:RightArm | 
				
			||||
 | 
					    100028: mixamorig:RightFoot | 
				
			||||
 | 
					    100030: mixamorig:RightForeArm | 
				
			||||
 | 
					    100032: mixamorig:RightHand | 
				
			||||
 | 
					    100034: mixamorig:RightLeg | 
				
			||||
 | 
					    100036: mixamorig:RightShoulder | 
				
			||||
 | 
					    100038: mixamorig:RightToe_End | 
				
			||||
 | 
					    100040: mixamorig:RightToeBase | 
				
			||||
 | 
					    100042: mixamorig:RightUpLeg | 
				
			||||
 | 
					    100044: mixamorig:Spine | 
				
			||||
 | 
					    100046: mixamorig:Spine1 | 
				
			||||
 | 
					    100048: mixamorig:Spine2 | 
				
			||||
 | 
					    100050: //RootNode | 
				
			||||
 | 
					    400000: mixamorig:Head | 
				
			||||
 | 
					    400002: mixamorig:HeadTop_End | 
				
			||||
 | 
					    400004: mixamorig:Hips | 
				
			||||
 | 
					    400006: mixamorig:LeftArm | 
				
			||||
 | 
					    400008: mixamorig:LeftFoot | 
				
			||||
 | 
					    400010: mixamorig:LeftForeArm | 
				
			||||
 | 
					    400012: mixamorig:LeftHand | 
				
			||||
 | 
					    400014: mixamorig:LeftLeg | 
				
			||||
 | 
					    400016: mixamorig:LeftShoulder | 
				
			||||
 | 
					    400018: mixamorig:LeftToe_End | 
				
			||||
 | 
					    400020: mixamorig:LeftToeBase | 
				
			||||
 | 
					    400022: mixamorig:LeftUpLeg | 
				
			||||
 | 
					    400024: mixamorig:Neck | 
				
			||||
 | 
					    400026: mixamorig:RightArm | 
				
			||||
 | 
					    400028: mixamorig:RightFoot | 
				
			||||
 | 
					    400030: mixamorig:RightForeArm | 
				
			||||
 | 
					    400032: mixamorig:RightHand | 
				
			||||
 | 
					    400034: mixamorig:RightLeg | 
				
			||||
 | 
					    400036: mixamorig:RightShoulder | 
				
			||||
 | 
					    400038: mixamorig:RightToe_End | 
				
			||||
 | 
					    400040: mixamorig:RightToeBase | 
				
			||||
 | 
					    400042: mixamorig:RightUpLeg | 
				
			||||
 | 
					    400044: mixamorig:Spine | 
				
			||||
 | 
					    400046: mixamorig:Spine1 | 
				
			||||
 | 
					    400048: mixamorig:Spine2 | 
				
			||||
 | 
					    400050: //RootNode | 
				
			||||
 | 
					    7400000: running | 
				
			||||
 | 
					    9500000: //RootNode | 
				
			||||
 | 
					  externalObjects: {} | 
				
			||||
 | 
					  materials: | 
				
			||||
 | 
					    importMaterials: 1 | 
				
			||||
 | 
					    materialName: 0 | 
				
			||||
 | 
					    materialSearch: 1 | 
				
			||||
 | 
					    materialLocation: 1 | 
				
			||||
 | 
					  animations: | 
				
			||||
 | 
					    legacyGenerateAnimations: 4 | 
				
			||||
 | 
					    bakeSimulation: 0 | 
				
			||||
 | 
					    resampleCurves: 1 | 
				
			||||
 | 
					    optimizeGameObjects: 0 | 
				
			||||
 | 
					    motionNodeName:  | 
				
			||||
 | 
					    rigImportErrors:  | 
				
			||||
 | 
					    rigImportWarnings:  | 
				
			||||
 | 
					    animationImportErrors:  | 
				
			||||
 | 
					    animationImportWarnings:  | 
				
			||||
 | 
					    animationRetargetingWarnings:  | 
				
			||||
 | 
					    animationDoRetargetingWarnings: 0 | 
				
			||||
 | 
					    importAnimatedCustomProperties: 0 | 
				
			||||
 | 
					    importConstraints: 0 | 
				
			||||
 | 
					    animationCompression: 3 | 
				
			||||
 | 
					    animationRotationError: 0.5 | 
				
			||||
 | 
					    animationPositionError: 0.5 | 
				
			||||
 | 
					    animationScaleError: 0.5 | 
				
			||||
 | 
					    animationWrapMode: 0 | 
				
			||||
 | 
					    extraExposedTransformPaths: [] | 
				
			||||
 | 
					    extraUserProperties: [] | 
				
			||||
 | 
					    clipAnimations: | 
				
			||||
 | 
					    - serializedVersion: 16 | 
				
			||||
 | 
					      name: running | 
				
			||||
 | 
					      takeName: mixamo.com | 
				
			||||
 | 
					      firstFrame: 0 | 
				
			||||
 | 
					      lastFrame: 42 | 
				
			||||
 | 
					      wrapMode: 0 | 
				
			||||
 | 
					      orientationOffsetY: 0 | 
				
			||||
 | 
					      level: 0.07 | 
				
			||||
 | 
					      cycleOffset: 0 | 
				
			||||
 | 
					      loop: 0 | 
				
			||||
 | 
					      hasAdditiveReferencePose: 0 | 
				
			||||
 | 
					      loopTime: 1 | 
				
			||||
 | 
					      loopBlend: 0 | 
				
			||||
 | 
					      loopBlendOrientation: 1 | 
				
			||||
 | 
					      loopBlendPositionY: 1 | 
				
			||||
 | 
					      loopBlendPositionXZ: 0 | 
				
			||||
 | 
					      keepOriginalOrientation: 1 | 
				
			||||
 | 
					      keepOriginalPositionY: 0 | 
				
			||||
 | 
					      keepOriginalPositionXZ: 1 | 
				
			||||
 | 
					      heightFromFeet: 1 | 
				
			||||
 | 
					      mirror: 0 | 
				
			||||
 | 
					      bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 | 
				
			||||
 | 
					      curves: [] | 
				
			||||
 | 
					      events: [] | 
				
			||||
 | 
					      transformMask: [] | 
				
			||||
 | 
					      maskType: 3 | 
				
			||||
 | 
					      maskSource: {instanceID: 0} | 
				
			||||
 | 
					      additiveReferencePoseFrame: 0 | 
				
			||||
 | 
					    isReadable: 1 | 
				
			||||
 | 
					  meshes: | 
				
			||||
 | 
					    lODScreenPercentages: [] | 
				
			||||
 | 
					    globalScale: 1 | 
				
			||||
 | 
					    meshCompression: 0 | 
				
			||||
 | 
					    addColliders: 0 | 
				
			||||
 | 
					    useSRGBMaterialColor: 1 | 
				
			||||
 | 
					    importVisibility: 1 | 
				
			||||
 | 
					    importBlendShapes: 1 | 
				
			||||
 | 
					    importCameras: 1 | 
				
			||||
 | 
					    importLights: 1 | 
				
			||||
 | 
					    swapUVChannels: 0 | 
				
			||||
 | 
					    generateSecondaryUV: 0 | 
				
			||||
 | 
					    useFileUnits: 1 | 
				
			||||
 | 
					    optimizeMeshForGPU: 1 | 
				
			||||
 | 
					    keepQuads: 0 | 
				
			||||
 | 
					    weldVertices: 1 | 
				
			||||
 | 
					    preserveHierarchy: 0 | 
				
			||||
 | 
					    indexFormat: 0 | 
				
			||||
 | 
					    secondaryUVAngleDistortion: 8 | 
				
			||||
 | 
					    secondaryUVAreaDistortion: 15.000001 | 
				
			||||
 | 
					    secondaryUVHardAngle: 88 | 
				
			||||
 | 
					    secondaryUVPackMargin: 4 | 
				
			||||
 | 
					    useFileScale: 1 | 
				
			||||
 | 
					    previousCalculatedGlobalScale: 0.01 | 
				
			||||
 | 
					    hasPreviousCalculatedGlobalScale: 1 | 
				
			||||
 | 
					  tangentSpace: | 
				
			||||
 | 
					    normalSmoothAngle: 60 | 
				
			||||
 | 
					    normalImportMode: 0 | 
				
			||||
 | 
					    tangentImportMode: 3 | 
				
			||||
 | 
					    normalCalculationMode: 4 | 
				
			||||
 | 
					    legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 | 
				
			||||
 | 
					    blendShapeNormalImportMode: 1 | 
				
			||||
 | 
					    normalSmoothingSource: 0 | 
				
			||||
 | 
					  importAnimation: 1 | 
				
			||||
 | 
					  copyAvatar: 1 | 
				
			||||
 | 
					  humanDescription: | 
				
			||||
 | 
					    serializedVersion: 2 | 
				
			||||
 | 
					    human: | 
				
			||||
 | 
					    - boneName: mixamorig:Hips | 
				
			||||
 | 
					      humanName: Hips | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      humanName: LeftUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      humanName: RightUpperLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftLeg | 
				
			||||
 | 
					      humanName: LeftLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightLeg | 
				
			||||
 | 
					      humanName: RightLowerLeg | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftFoot | 
				
			||||
 | 
					      humanName: LeftFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightFoot | 
				
			||||
 | 
					      humanName: RightFoot | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine | 
				
			||||
 | 
					      humanName: Spine | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine1 | 
				
			||||
 | 
					      humanName: Chest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Neck | 
				
			||||
 | 
					      humanName: Neck | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Head | 
				
			||||
 | 
					      humanName: Head | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      humanName: LeftShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightShoulder | 
				
			||||
 | 
					      humanName: RightShoulder | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftArm | 
				
			||||
 | 
					      humanName: LeftUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightArm | 
				
			||||
 | 
					      humanName: RightUpperArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      humanName: LeftLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightForeArm | 
				
			||||
 | 
					      humanName: RightLowerArm | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftHand | 
				
			||||
 | 
					      humanName: LeftHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightHand | 
				
			||||
 | 
					      humanName: RightHand | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      humanName: LeftToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:RightToeBase | 
				
			||||
 | 
					      humanName: RightToes | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    - boneName: mixamorig:Spine2 | 
				
			||||
 | 
					      humanName: UpperChest | 
				
			||||
 | 
					      limit: | 
				
			||||
 | 
					        min: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        max: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        value: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					        length: 0 | 
				
			||||
 | 
					        modified: 0 | 
				
			||||
 | 
					    skeleton: | 
				
			||||
 | 
					    - name: Backflip(Clone) | 
				
			||||
 | 
					      parentName:  | 
				
			||||
 | 
					      position: {x: 0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: 0, z: 0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: humanoidT | 
				
			||||
 | 
					      parentName: Backflip(Clone) | 
				
			||||
 | 
					      position: {x: -0, y: 0, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: butt | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.028619736, y: 1.0587679, z: 0.002142583} | 
				
			||||
 | 
					      rotation: {x: 0.7049101, y: -0.026212664, z: 0.013773171, w: 0.70867836} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: lower_waist | 
				
			||||
 | 
					      parentName: butt | 
				
			||||
 | 
					      position: {x: -0.021319339, y: 0.00040355325, z: -0.16483356} | 
				
			||||
 | 
					      rotation: {x: 0.0031044185, y: 0.0020000096, z: -0.000018799677, w: 0.9999932} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: abdomen_y | 
				
			||||
 | 
					      parentName: lower_waist | 
				
			||||
 | 
					      position: {x: -0.0000723721, y: 0.000012806966, z: -0.0017823265} | 
				
			||||
 | 
					      rotation: {x: 0.00014829637, y: 0.0018769234, z: -0.02827898, w: 0.9995983} | 
				
			||||
 | 
					      scale: {x: 1, y: 1.0000005, z: 1.0000002} | 
				
			||||
 | 
					    - name: upper_waist | 
				
			||||
 | 
					      parentName: lower_waist | 
				
			||||
 | 
					      position: {x: -0.0019383731, y: 0.00014567096, z: -0.14226863} | 
				
			||||
 | 
					      rotation: {x: -0.0004889473, y: 0.007208624, z: -0.028266912, w: 0.9995743} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: torso | 
				
			||||
 | 
					      parentName: upper_waist | 
				
			||||
 | 
					      position: {x: -0.010000003, y: 0, z: -0.12} | 
				
			||||
 | 
					      rotation: {x: -0, y: -0, z: 5.134097e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: head | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: 0.00012124982, y: -0.00066340127, z: -0.20378074} | 
				
			||||
 | 
					      rotation: {x: -0.7070211, y: -0.00034404645, z: -0.00035778637, w: 0.70719224} | 
				
			||||
 | 
					      scale: {x: 0.18, y: 0.18000005, z: 0.18000005} | 
				
			||||
 | 
					    - name: left_upper_arm | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.00805471, y: -0.3095426, z: -0.046386097} | 
				
			||||
 | 
					      rotation: {x: -0.050138354, y: -0.15586165, z: -0.020825602, w: 0.9862858} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_larm | 
				
			||||
 | 
					      parentName: left_upper_arm | 
				
			||||
 | 
					      position: {x: -0.05012562, y: -0.3203213, z: 0.013551146} | 
				
			||||
 | 
					      rotation: {x: -0.1464947, y: -0.69702035, z: -0.08435819, w: 0.6968398} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hand | 
				
			||||
 | 
					      parentName: left_larm | 
				
			||||
 | 
					      position: {x: -0.000015493482, y: -0.15598094, z: -0.000019282103} | 
				
			||||
 | 
					      rotation: {x: 0.6276541, y: -0.0002503395, z: 0.628233, w: 0.45975387} | 
				
			||||
 | 
					      scale: {x: 0.08000005, y: 0.08000001, z: 0.08000004} | 
				
			||||
 | 
					    - name: left_shoulder2 | 
				
			||||
 | 
					      parentName: left_upper_arm | 
				
			||||
 | 
					      position: {x: 0.023122678, y: 0.03264472, z: 0.08629361} | 
				
			||||
 | 
					      rotation: {x: -0.33152154, y: -0.00000017136335, z: 0.08883171, w: 0.9392563} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: right_upper_arm | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.0065300968, y: 0.3054909, z: -0.028148612} | 
				
			||||
 | 
					      rotation: {x: 0.9821227, y: 0.0047237636, z: 0.14654115, w: -0.118061} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_larm | 
				
			||||
 | 
					      parentName: right_upper_arm | 
				
			||||
 | 
					      position: {x: -0.05019078, y: -0.32017505, z: -0.013448662} | 
				
			||||
 | 
					      rotation: {x: 0.14644656, y: 0.69692343, z: -0.08455098, w: 0.69692343} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hand | 
				
			||||
 | 
					      parentName: right_larm | 
				
			||||
 | 
					      position: {x: -0.00003791973, y: -0.15599604, z: 0.00002259016} | 
				
			||||
 | 
					      rotation: {x: -0.6275729, y: 0.0003462434, z: 0.6282862, w: 0.459792} | 
				
			||||
 | 
					      scale: {x: 0.079999946, y: 0.080000006, z: 0.07999995} | 
				
			||||
 | 
					    - name: right_shoulder2 | 
				
			||||
 | 
					      parentName: right_upper_arm | 
				
			||||
 | 
					      position: {x: 0.018984409, y: 0.021175496, z: -0.07061822} | 
				
			||||
 | 
					      rotation: {x: 0.26393244, y: -0.0016188326, z: 0.07030048, w: 0.9619745} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000002, z: 1.0000001} | 
				
			||||
 | 
					    - name: Shoulder | 
				
			||||
 | 
					      parentName: torso | 
				
			||||
 | 
					      position: {x: -0.001, y: -0.001, z: -0.075} | 
				
			||||
 | 
					      rotation: {x: 0.001067541, y: -0.707106, z: 0.707106, w: 0.001067541} | 
				
			||||
 | 
					      scale: {x: 0.050000057, y: 0.05000001, z: 0.3} | 
				
			||||
 | 
					    - name: Spine | 
				
			||||
 | 
					      parentName: butt | 
				
			||||
 | 
					      position: {x: -0.033886682, y: 0.0012130737, z: -0.29749244} | 
				
			||||
 | 
					      rotation: {x: 0.010788803, y: -0.0027317873, z: 0.99953836, w: 0.028269844} | 
				
			||||
 | 
					      scale: {x: 0.05000011, y: 0.05000005, z: 0.6000004} | 
				
			||||
 | 
					    - name: left_thigh | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.022163205, y: 0.8473689, z: -0.09560348} | 
				
			||||
 | 
					      rotation: {x: -0.008197911, y: -0.008591415, z: 0.024315646, w: 0.99963385} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hip_y | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: -0.00018789193, y: 0.00050958304, z: 0.0037600398} | 
				
			||||
 | 
					      rotation: {x: -0.011198115, y: -0.019681891, z: -0.00040819624, w: 0.9997435} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_hip_z | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: 0.000009631686, y: 0.00050954695, z: 0.0037639162} | 
				
			||||
 | 
					      rotation: {x: -0.011199301, y: 0.00007027015, z: -0.00004858979, w: 0.9999373} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_shin | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: 0.0069502685, y: -0.38283935, z: -0.006257828} | 
				
			||||
 | 
					      rotation: {x: 0.014698038, y: -0.0003006309, z: 0.020444054, w: 0.9996829} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_left_foot | 
				
			||||
 | 
					      parentName: left_shin | 
				
			||||
 | 
					      position: {x: -0.04318934, y: -0.23842703, z: -0.026194116} | 
				
			||||
 | 
					      rotation: {x: 0.033987474, y: -0.015081191, z: -0.73684585, w: 0.6750375} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: left_ankle_x | 
				
			||||
 | 
					      parentName: left_left_foot | 
				
			||||
 | 
					      position: {x: 0.0028956856, y: 0.0075475774, z: -0.000414714} | 
				
			||||
 | 
					      rotation: {x: -0.0043921056, y: 0.0034287455, z: 0.046523295, w: 0.99890167} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: left_right_foot | 
				
			||||
 | 
					      parentName: left_left_foot | 
				
			||||
 | 
					      position: {x: -0.012464729, y: 0.005532327, z: 0.21164574} | 
				
			||||
 | 
					      rotation: {x: 0.0533601, y: 0.06701755, z: -0.0019481222, w: 0.99632204} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: LeftLeg__1_ | 
				
			||||
 | 
					      parentName: left_thigh | 
				
			||||
 | 
					      position: {x: -0.040999997, y: -0.30899996, z: 0.19} | 
				
			||||
 | 
					      rotation: {x: 0.009720462, y: 0.71269727, z: -0.7010641, w: -0.02184826} | 
				
			||||
 | 
					      scale: {x: 0.05000017, y: 0.050000105, z: 0.6000013} | 
				
			||||
 | 
					    - name: right_thigh | 
				
			||||
 | 
					      parentName: humanoidT | 
				
			||||
 | 
					      position: {x: 0.010520758, y: 0.84846205, z: 0.09885497} | 
				
			||||
 | 
					      rotation: {x: 0.0074896533, y: -0.027545288, z: 0.022941835, w: 0.9993292} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hip_y | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: 0.000021025491, y: 0.0009465131, z: -0.0013828418} | 
				
			||||
 | 
					      rotation: {x: 0.0036728394, y: -0.00037535836, z: -0.00008118107, w: 0.9999932} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_hip_z | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: -0.0000000049330993, y: 0.0000052593314, z: -0.0013360521} | 
				
			||||
 | 
					      rotation: {x: 0.003927878, y: 1.3571037e-25, z: -0.000000013460522, w: 0.9999923} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_shin | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: 0.0068513784, y: -0.38295454, z: 0.006241403} | 
				
			||||
 | 
					      rotation: {x: -0.014669814, y: 0.0003177673, z: 0.020145983, w: 0.9996894} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_right_foot | 
				
			||||
 | 
					      parentName: right_shin | 
				
			||||
 | 
					      position: {x: -0.043461975, y: -0.239265, z: 0.02424076} | 
				
			||||
 | 
					      rotation: {x: -0.017235627, y: 0.021577317, z: -0.735891, w: 0.6765366} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: right_ankle_x | 
				
			||||
 | 
					      parentName: right_right_foot | 
				
			||||
 | 
					      position: {x: 0.0029095989, y: 0.0074111656, z: 0.00041196973} | 
				
			||||
 | 
					      rotation: {x: 0.004348083, y: -0.0036474187, z: 0.04522145, w: 0.9989609} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: right_left_foot | 
				
			||||
 | 
					      parentName: right_right_foot | 
				
			||||
 | 
					      position: {x: -0.003858014, y: 0.01637404, z: -0.21142484} | 
				
			||||
 | 
					      rotation: {x: -0.0532643, y: -0.0675717, z: -0.0010922394, w: 0.99629104} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: RightLeg | 
				
			||||
 | 
					      parentName: right_thigh | 
				
			||||
 | 
					      position: {x: -0.043, y: -0.316, z: -0.18299998} | 
				
			||||
 | 
					      rotation: {x: 0.004674896, y: -0.701414, z: 0.7119129, w: 0.03430193} | 
				
			||||
 | 
					      scale: {x: 0.05000008, y: 0.05000004, z: 0.6000004} | 
				
			||||
 | 
					    - name: mixamorig:Hips | 
				
			||||
 | 
					      parentName: Backflip(Clone) | 
				
			||||
 | 
					      position: {x: -0.005175761, y: 0.9335466, z: -0.0036196744} | 
				
			||||
 | 
					      rotation: {x: 0.000000008326478, y: 0.71872675, z: -0.000000014373027, w: 0.69529265} | 
				
			||||
 | 
					      scale: {x: 1, y: 1.0000002, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.008040293, y: -0.05244598, z: 0.10175739} | 
				
			||||
 | 
					      rotation: {x: -0.000096233984, y: -0.007695467, z: 0.99989223, w: -0.012503546} | 
				
			||||
 | 
					      scale: {x: 1.0000052, y: 1.0000025, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:RightLeg | 
				
			||||
 | 
					      parentName: mixamorig:RightUpLeg | 
				
			||||
 | 
					      position: {x: 4.440892e-18, y: 0.4222232, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.019863136, y: 0.0010614229, z: 0.053350624, w: 0.9983777} | 
				
			||||
 | 
					      scale: {x: 1.0000031, y: 1.0000021, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:RightFoot | 
				
			||||
 | 
					      parentName: mixamorig:RightLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.38956782, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.42334923, y: -0.5705113, z: 0.4392357, w: -0.5498767} | 
				
			||||
 | 
					      scale: {x: 1.0000018, y: 1.0000029, z: 1.0000002} | 
				
			||||
 | 
					    - name: mixamorig:RightToeBase | 
				
			||||
 | 
					      parentName: mixamorig:RightFoot | 
				
			||||
 | 
					      position: {x: -0, y: 0.12412127, z: 7.105427e-17} | 
				
			||||
 | 
					      rotation: {x: -0.20302476, y: 0.0002567768, z: 0.0012378544, w: -0.9791728} | 
				
			||||
 | 
					      scale: {x: 1.0000008, y: 0.9999995, z: 1.0000048} | 
				
			||||
 | 
					    - name: mixamorig:RightToe_End | 
				
			||||
 | 
					      parentName: mixamorig:RightToeBase | 
				
			||||
 | 
					      position: {x: -0, y: 0.060296334, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: 0.0035344027, y: -0.05244598, z: -0.10175739} | 
				
			||||
 | 
					      rotation: {x: 0.00008969172, y: 0.007695548, z: 0.9999024, w: -0.011660735} | 
				
			||||
 | 
					      scale: {x: 1.000008, y: 1.0000052, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftLeg | 
				
			||||
 | 
					      parentName: mixamorig:LeftUpLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.42220598, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.019789819, y: -0.001283939, z: 0.06472981, w: 0.9977058} | 
				
			||||
 | 
					      scale: {x: 1.0000039, y: 1.000004, z: 1.0000007} | 
				
			||||
 | 
					    - name: mixamorig:LeftFoot | 
				
			||||
 | 
					      parentName: mixamorig:LeftLeg | 
				
			||||
 | 
					      position: {x: -0, y: 0.3907465, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.45038655, y: 0.54181254, z: -0.4355745, w: 0.5602374} | 
				
			||||
 | 
					      scale: {x: 1.0000029, y: 1.0000026, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:LeftToeBase | 
				
			||||
 | 
					      parentName: mixamorig:LeftFoot | 
				
			||||
 | 
					      position: {x: -0, y: 0.1308076, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.19264501, y: 0.00046184653, z: 0.002352476, w: 0.9812656} | 
				
			||||
 | 
					      scale: {x: 1.000001, y: 0.99999976, z: 1.0000021} | 
				
			||||
 | 
					    - name: mixamorig:LeftToe_End | 
				
			||||
 | 
					      parentName: mixamorig:LeftToeBase | 
				
			||||
 | 
					      position: {x: -0, y: 0.061049044, z: -3.5527136e-17} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine | 
				
			||||
 | 
					      parentName: mixamorig:Hips | 
				
			||||
 | 
					      position: {x: -0.0024581861, y: 0.094537124, z: 1.110223e-18} | 
				
			||||
 | 
					      rotation: {x: -0.0000000011847465, y: 0.000000027988655, z: 0.012997864, w: 0.99991554} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.9999999, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine1 | 
				
			||||
 | 
					      parentName: mixamorig:Spine | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.1103307, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.000000004352489, y: -0.000000046559435, z: 0.000000027008355, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 0.9999999, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Spine2 | 
				
			||||
 | 
					      parentName: mixamorig:Spine1 | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.12609196, z: 0} | 
				
			||||
 | 
					      rotation: {x: 0.000000058169196, y: 0.000000018020504, z: -9.31326e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000001, z: 1.0000001} | 
				
			||||
 | 
					    - name: mixamorig:Neck | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: 0.000000007613613, y: 0.14185366, z: -5.551115e-19} | 
				
			||||
 | 
					      rotation: {x: 0.000000015957266, y: 0.000000016797909, z: -0.012997881, w: 0.99991554} | 
				
			||||
 | 
					      scale: {x: 0.9999999, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:Head | 
				
			||||
 | 
					      parentName: mixamorig:Neck | 
				
			||||
 | 
					      position: {x: -0.0008683859, y: 0.053217314, z: 5.551115e-19} | 
				
			||||
 | 
					      rotation: {x: -0.000000007200165, y: 0.0000000015158257, z: -0.000000024214387, | 
				
			||||
 | 
					        w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1, z: 1.0000004} | 
				
			||||
 | 
					    - name: mixamorig:HeadTop_End | 
				
			||||
 | 
					      parentName: mixamorig:Head | 
				
			||||
 | 
					      position: {x: -0.0022724792, y: 0.13926437, z: 1.110223e-18} | 
				
			||||
 | 
					      rotation: {x: 0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1, y: 1, z: 1} | 
				
			||||
 | 
					    - name: mixamorig:LeftShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: 0.00020240633, y: 0.13515088, z: -0.04127286} | 
				
			||||
 | 
					      rotation: {x: -0.0019427737, y: -0.64387274, z: 0.7651283, w: -0.0016816484} | 
				
			||||
 | 
					      scale: {x: 1.0000032, y: 1.0000012, z: 1.0000011} | 
				
			||||
 | 
					    - name: mixamorig:LeftArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftShoulder | 
				
			||||
 | 
					      position: {x: -0, y: 0.0791558, z: 2.842171e-16} | 
				
			||||
 | 
					      rotation: {x: -0.052307434, y: 0.0017309872, z: -0.0049234666, w: 0.9986174} | 
				
			||||
 | 
					      scale: {x: 1.0000021, y: 1.0000029, z: 1.0000021} | 
				
			||||
 | 
					    - name: mixamorig:LeftForeArm | 
				
			||||
 | 
					      parentName: mixamorig:LeftArm | 
				
			||||
 | 
					      position: {x: 4.440892e-18, y: 0.3525264, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.03167211, y: 0.0079971645, z: -0.016885435, w: 0.9993237} | 
				
			||||
 | 
					      scale: {x: 1.0000007, y: 1.0000013, z: 1.0000008} | 
				
			||||
 | 
					    - name: mixamorig:LeftHand | 
				
			||||
 | 
					      parentName: mixamorig:LeftForeArm | 
				
			||||
 | 
					      position: {x: 1.7763568e-17, y: 0.29053873, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0, y: -2.3283064e-10, z: -1.3096724e-10, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000012, y: 1.0000001, z: 0.99999976} | 
				
			||||
 | 
					    - name: mixamorig:RightShoulder | 
				
			||||
 | 
					      parentName: mixamorig:Spine2 | 
				
			||||
 | 
					      position: {x: -0.0005504584, y: 0.13517044, z: 0.04127286} | 
				
			||||
 | 
					      rotation: {x: 0.7649505, y: -0.004635785, z: 0.005321747, w: 0.6440504} | 
				
			||||
 | 
					      scale: {x: 1.0000002, y: 1.0000006, z: 1.0000019} | 
				
			||||
 | 
					    - name: mixamorig:RightArm | 
				
			||||
 | 
					      parentName: mixamorig:RightShoulder | 
				
			||||
 | 
					      position: {x: -0, y: 0.079155795, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.04782623, y: -0.0011201247, z: 0.016020544, w: 0.9987266} | 
				
			||||
 | 
					      scale: {x: 0.9999999, y: 1.0000025, z: 1.0000014} | 
				
			||||
 | 
					    - name: mixamorig:RightForeArm | 
				
			||||
 | 
					      parentName: mixamorig:RightArm | 
				
			||||
 | 
					      position: {x: -0, y: 0.3522625, z: 0} | 
				
			||||
 | 
					      rotation: {x: -0.03519323, y: -0.0078160325, z: 0.030223342, w: 0.99889284} | 
				
			||||
 | 
					      scale: {x: 1.0000007, y: 1.0000008, z: 1.0000008} | 
				
			||||
 | 
					    - name: mixamorig:RightHand | 
				
			||||
 | 
					      parentName: mixamorig:RightForeArm | 
				
			||||
 | 
					      position: {x: 8.881784e-18, y: 0.2879794, z: 2.842171e-16} | 
				
			||||
 | 
					      rotation: {x: -0, y: -0, z: -0, w: 1} | 
				
			||||
 | 
					      scale: {x: 1.0000001, y: 1.0000005, z: 1.0000005} | 
				
			||||
 | 
					    armTwist: 0.5 | 
				
			||||
 | 
					    foreArmTwist: 0.5 | 
				
			||||
 | 
					    upperLegTwist: 0.5 | 
				
			||||
 | 
					    legTwist: 0.5 | 
				
			||||
 | 
					    armStretch: 0.05 | 
				
			||||
 | 
					    legStretch: 0.05 | 
				
			||||
 | 
					    feetSpacing: 0 | 
				
			||||
 | 
					    rootMotionBoneName:  | 
				
			||||
 | 
					    hasTranslationDoF: 0 | 
				
			||||
 | 
					    hasExtraRoot: 1 | 
				
			||||
 | 
					    skeletonHasParents: 1 | 
				
			||||
 | 
					  lastHumanDescriptionAvatarSource: {fileID: 9000000, guid: fa0773caae34843268db7f12c1421ce5, | 
				
			||||
 | 
					    type: 3} | 
				
			||||
 | 
					  animationType: 3 | 
				
			||||
 | 
					  humanoidOversampling: 1 | 
				
			||||
 | 
					  additionalBone: 0 | 
				
			||||
 | 
					  userData:  | 
				
			||||
 | 
					  assetBundleName:  | 
				
			||||
 | 
					  assetBundleVariant:  | 
				
			||||
Some files were not shown because too many files changed in this diff
					Loading…
					
					
				
		Reference in new issue