diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f1f430..0a71d6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +## [201.0.0] + +## What's New +- We're standardizing our OS versioning to provide more clarity on the scope and impact of each release. This helps you plan your development by making critical updates predictable and support documentation easier to navigate. Going forward, you'll see this new versioning system (e.g. OS 200, 201, etc.). +- **Tracking space support**: Movement SDK now works correctly when `OVRCameraRig.trackingSpace` has a non-identity pose. Previously, the body-tracking avatar would detach from the user's body when used with features like MRUK World Locking. +- **RootMotionMode support**: New `RootMotionMode` enum (`WorldSpace`/`LocalSpace`) in C# bindings, with root pose extraction via `GetPoseByRef` and root motion application option on `AIMotionSynthesizerSourceDataProvider`. Includes debug skeleton visualization. +- **Networked root scale**: Root scale is now serialized as part of the snapshot header, enabling correct character scale in networked sessions without manual C# setup. +- **Cross-engine config compatibility**: Added a skeleton flag and coordinate space conversion fixes so retargeting configs created in Unity work in Unreal (and vice versa). Existing configs continue to work on their original engine; new configs are cross-engine compatible. +- **Improved auto-mapping**: KnownJoint detection algorithm now correctly identifies joints on previously failing rigs (Unreal Mannequin, Avatar Gen Mas). Auto Fill is now ~1-click for ~95% of character rigs. New reverse mapping utility lets configs daisy-chain rig→rig retargeting. + +## What's Changed +- **Minimum Unity version raised from 2022.3 to Unity 6.** +- **Joystick input improvements**: Reference forward calculation now uses `ProjectOnPlane`; removed automatic `OVRCameraRig` dependency (uses component's transform as default); direction logic considers movement direction when look input is inactive. +- **Simplified C# serialization API**: Removed unused `createSnapshot` entry point. All C# serialization calls now use struct-based APIs. + +## What's Fixed +- **Retargeter no longer overwrites eye bone transforms**: `CharacterRetargeter` now skips joints that have no mapping in the source body-tracking skeleton, allowing components like `OVREyeGaze` to control eyes without being clobbered each frame. +- **`AnimatorHorizontalParam` fix** (resolves [Unity-Movement#133](https://github.com/oculus-samples/Unity-Movement/issues/133)). +- **Memory leaks** caused by undisposed `Allocator.TempJob` allocations in `GetTrackerPosesAndIndices` and `SkeletonUtilities.GetPosesFromTheTracker`, plus a leak of `TargetReferencePoseLocal` (`Allocator.Persistent`) in `SkeletonRetargeter.Dispose`. +- **`RootMotionMode` enum order restored** so Unity serialized values and dropdown entries match prior behavior. +- **Unmapped joints with zero-length parents** no longer flicker/oscillate in debug draw; falls back to scale 1.0. + ## [83.0.0] ## What's New diff --git a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfigDrawer.cs b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfigDrawer.cs index 42cb22e..2698d4f 100644 --- a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfigDrawer.cs +++ b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfigDrawer.cs @@ -8,12 +8,19 @@ namespace Meta.XR.Movement.AI.Editor [CustomPropertyDrawer(typeof(AIMotionSynthesizerConfig))] public class AIMotionSynthesizerConfigDrawer : PropertyDrawer { - private const string _basePath = "Packages/com.meta.xr.sdk.movement/Runtime/Native/"; + private const string BasePath = "Packages/com.meta.xr.sdk.movement/Runtime/Native/"; - private static readonly Color _headerColor = new Color(0.3f, 0.5f, 0.7f, 0.2f); - private static readonly Color _blendColor = new Color(0.4f, 0.7f, 0.4f, 0.15f); - private static readonly Color _motionColor = new Color(0.7f, 0.5f, 0.3f, 0.15f); - private static readonly Color _debugColor = new Color(0.5f, 0.3f, 0.7f, 0.15f); + private static readonly Color HeaderColor = new(0.3f, 0.5f, 0.7f, 0.2f); + private static readonly Color BlendColor = new(0.4f, 0.7f, 0.4f, 0.15f); + private static readonly Color MotionColor = new(0.7f, 0.5f, 0.3f, 0.15f); + private static readonly Color DebugColor = new(0.5f, 0.3f, 0.7f, 0.15f); + + private static readonly (string prop, string path)[] DefaultAssets = + { + ("Config", "Data/AIMotionSynthesizerSkeletonData.json"), + ("ModelAsset", "Data/AIMotionSynthesizerModel.bytes"), + ("GuidanceAsset", "Data/AIMotionSynthesizerGuidance.bytes") + }; public override float GetPropertyHeight(SerializedProperty property, GUIContent label) => -1; @@ -28,78 +35,75 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten if (property.isExpanded) { EditorGUI.indentLevel++; + DrawAllSections(property); + EditorGUI.indentLevel--; + } - AIMotionSynthesizerEditorUtils.DrawSection("Assets", _headerColor, () => - { - EditorGUILayout.PropertyField(property.FindPropertyRelative("Config")); - EditorGUILayout.PropertyField(property.FindPropertyRelative("ModelAsset")); - EditorGUILayout.PropertyField(property.FindPropertyRelative("GuidanceAsset")); + EditorGUI.EndProperty(); + } - EditorGUILayout.Space(4); + private void DrawAllSections(SerializedProperty property) + { + AIMotionSynthesizerEditorUtils.DrawSection("Assets", HeaderColor, () => + { + EditorGUILayout.PropertyField(property.FindPropertyRelative("Config")); + EditorGUILayout.PropertyField(property.FindPropertyRelative("ModelAsset")); + EditorGUILayout.PropertyField(property.FindPropertyRelative("GuidanceAsset")); + EditorGUILayout.Space(4); + if (GUILayout.Button("Load Default Assets")) + { + LoadAssets(property); + } + }); - if (GUILayout.Button("Load Default Assets")) - { - LoadAssets(property); - } - }); + EditorGUILayout.Space(4); - EditorGUILayout.Space(4); + AIMotionSynthesizerEditorUtils.DrawSection("Blend Settings", BlendColor, () => DrawBlendSettings(property)); - AIMotionSynthesizerEditorUtils.DrawSection("Blend Settings", _blendColor, () => DrawBlendSettings(property)); + EditorGUILayout.Space(4); - EditorGUILayout.Space(4); + AIMotionSynthesizerEditorUtils.DrawSection("Motion", MotionColor, () => + { + var rootMotionModeProp = property.FindPropertyRelative("RootMotionMode"); + if (rootMotionModeProp == null) + { + return; + } - AIMotionSynthesizerEditorUtils.DrawSection("Motion", _motionColor, () => + EditorGUILayout.PropertyField(rootMotionModeProp); + if (rootMotionModeProp.enumValueIndex == (int)RootMotionMode.ApplyFromReference) { - var rootMotionModeProp = property.FindPropertyRelative("RootMotionMode"); - if (rootMotionModeProp != null) + var referenceProp = property.FindPropertyRelative("ReferenceTransform"); + if (referenceProp != null) { - EditorGUILayout.PropertyField(rootMotionModeProp); - - if (rootMotionModeProp.enumValueIndex == (int)RootMotionMode.ApplyFromReference) - { - var referenceTransformProp = property.FindPropertyRelative("ReferenceTransform"); - if (referenceTransformProp != null) - { - EditorGUILayout.PropertyField(referenceTransformProp); - } - } + EditorGUILayout.PropertyField(referenceProp); } - }); + } + }); - EditorGUILayout.Space(4); + EditorGUILayout.Space(4); - AIMotionSynthesizerEditorUtils.DrawSection("Debug", _debugColor, () => + AIMotionSynthesizerEditorUtils.DrawSection("Debug", DebugColor, () => + { + var debugProp = property.FindPropertyRelative("DebugDrawAIMotionSynthesizer"); + EditorGUILayout.PropertyField(debugProp); + if (debugProp.boolValue) { - EditorGUILayout.PropertyField(property.FindPropertyRelative("DebugDrawAIMotionSynthesizer")); - - if (property.FindPropertyRelative("DebugDrawAIMotionSynthesizer").boolValue) - { - EditorGUILayout.PropertyField(property.FindPropertyRelative("DebugAIMotionSynthesizerColor")); - } - }); - - EditorGUI.indentLevel--; - } - EditorGUI.EndProperty(); + EditorGUILayout.PropertyField(property.FindPropertyRelative("DebugAIMotionSynthesizerColor")); + } + }); } private void AutoAssignFilesAndInputProvider(SerializedProperty property) { bool changed = false; - var files = new[] { - ("Config", "Data/AIMotionSynthesizerSkeletonData.json"), - ("ModelAsset", "Data/AIMotionSynthesizerModel.bytes"), - ("GuidanceAsset", "Data/AIMotionSynthesizerGuidance.bytes") - }; - - foreach (var (prop, path) in files) + foreach (var (prop, path) in DefaultAssets) { var p = property.FindPropertyRelative(prop); if (p?.objectReferenceValue == null) { - var asset = AssetDatabase.LoadAssetAtPath(_basePath + path); + var asset = AssetDatabase.LoadAssetAtPath(BasePath + path); if (asset != null) { p.objectReferenceValue = asset; @@ -109,17 +113,14 @@ private void AutoAssignFilesAndInputProvider(SerializedProperty property) } var inputProviderProp = property.FindPropertyRelative("InputProvider"); - if (inputProviderProp?.objectReferenceValue == null) + if (inputProviderProp?.objectReferenceValue == null && + property.serializedObject.targetObject is MonoBehaviour mb) { - var serializedObject = property.serializedObject; - if (serializedObject.targetObject is MonoBehaviour mb) + var inputProvider = mb.GetComponent(); + if (inputProvider != null) { - var inputProvider = mb.GetComponent(); - if (inputProvider != null) - { - inputProviderProp.objectReferenceValue = inputProvider as MonoBehaviour; - changed = true; - } + inputProviderProp.objectReferenceValue = inputProvider as MonoBehaviour; + changed = true; } } @@ -145,19 +146,13 @@ private void AutoAssignFilesAndInputProvider(SerializedProperty property) private void LoadAssets(SerializedProperty property) { - var files = new[] { - ("Config", "Data/AIMotionSynthesizerSkeletonData.json"), - ("ModelAsset", "AIMotionSynthesizer/AIMotionSynthesizerModel.bytes"), - ("StyleAsset", "AIMotionSynthesizer/AIMotionSynthesizerStyle.bytes") - }; - bool changed = false; - foreach (var (prop, path) in files) + foreach (var (prop, path) in DefaultAssets) { var p = property.FindPropertyRelative(prop); if (p?.objectReferenceValue == null) { - var asset = AssetDatabase.LoadAssetAtPath(_basePath + path); + var asset = AssetDatabase.LoadAssetAtPath(BasePath + path); if (asset != null) { p.objectReferenceValue = asset; @@ -165,7 +160,11 @@ private void LoadAssets(SerializedProperty property) } } } - if (changed) property.serializedObject.ApplyModifiedProperties(); + + if (changed) + { + property.serializedObject.ApplyModifiedProperties(); + } } private void DrawBlendSettings(SerializedProperty property) @@ -185,18 +184,20 @@ private void DrawBlendSettings(SerializedProperty property) } } - var enableSynthesizedStandingPoseProp = property.FindPropertyRelative("EnableSynthesizedStandingPose"); - if (enableSynthesizedStandingPoseProp != null) + var synthPoseProp = property.FindPropertyRelative("EnableSynthesizedStandingPose"); + if (synthPoseProp != null) { - EditorGUILayout.PropertyField(enableSynthesizedStandingPoseProp, + EditorGUILayout.PropertyField(synthPoseProp, new GUIContent("Enable Synthesized Standing Pose", "When enabled, uses synthesized standing pose with blend factor always set to 1 instead of the blended pose.")); - } - if (enableSynthesizedStandingPoseProp == null || !enableSynthesizedStandingPoseProp.boolValue) - { - DrawBodySourceSettings(property); + if (!synthPoseProp.boolValue) + { + DrawBodySourceSettings(property); + } } + + DrawRootAlignmentDirection(property); } private void DrawManualBlendMode(SerializedProperty property) @@ -207,17 +208,8 @@ private void DrawManualBlendMode(SerializedProperty property) EditorGUILayout.Slider(blendProp, 0f, 1f, new GUIContent("Blend Factor")); } - var manualVelocityProp = property.FindPropertyRelative("ManualVelocity"); - if (manualVelocityProp != null) - { - EditorGUILayout.PropertyField(manualVelocityProp); - } - - var manualDirectionProp = property.FindPropertyRelative("ManualDirection"); - if (manualDirectionProp != null) - { - EditorGUILayout.PropertyField(manualDirectionProp); - } + DrawPropertyIfExists(property, "ManualVelocity"); + DrawPropertyIfExists(property, "ManualDirection"); } private void DrawInputBlendMode(SerializedProperty property) @@ -240,57 +232,54 @@ private void DrawInputBlendMode(SerializedProperty property) } } - var blendInTimeProp = property.FindPropertyRelative("BlendInTime"); - if (blendInTimeProp != null) - { - EditorGUILayout.PropertyField(blendInTimeProp); - } - - var blendOutTimeProp = property.FindPropertyRelative("BlendOutTime"); - if (blendOutTimeProp != null) - { - EditorGUILayout.PropertyField(blendOutTimeProp); - } + DrawPropertyIfExists(property, "BlendInTime"); + DrawPropertyIfExists(property, "BlendOutTime"); + DrawPropertyIfExists(property, "InputActiveThreshold"); + } - var inputActiveThresholdProp = property.FindPropertyRelative("InputActiveThreshold"); - if (inputActiveThresholdProp != null) + private static void DrawPropertyIfExists(SerializedProperty property, string name) + { + var prop = property.FindPropertyRelative(name); + if (prop != null) { - EditorGUILayout.PropertyField(inputActiveThresholdProp); + EditorGUILayout.PropertyField(prop); } } private void DrawBodySourceSettings(SerializedProperty property) { - var upperBodySourceProp = property.FindPropertyRelative("UpperBodySource"); - if (upperBodySourceProp != null) - { - EditorGUILayout.PropertyField(upperBodySourceProp); - } + DrawPropertyIfExists(property, "UpperBodySource"); + DrawPropertyIfExists(property, "LowerBodySource"); + } - var lowerBodySourceProp = property.FindPropertyRelative("LowerBodySource"); - if (lowerBodySourceProp != null) + private void DrawRootAlignmentDirection(SerializedProperty property) + { + var prop = property.FindPropertyRelative("RootAlignmentDirection"); + if (prop != null) { - EditorGUILayout.PropertyField(lowerBodySourceProp); + EditorGUILayout.PropertyField(prop, + new GUIContent("Root Alignment", + "Which pose's forward direction to align to during blending. " + + "BodyTracking: blended result follows user's facing direction. " + + "AIMotionSynthesizer: blended result follows procedural animation direction.")); } } private void AddDefaultInputProvider(SerializedProperty property) { - var serializedObject = property.serializedObject; - if (serializedObject.targetObject is MonoBehaviour mb) + if (property.serializedObject.targetObject is not MonoBehaviour mb) { - var existingJoystickInput = mb.GetComponent(); - if (existingJoystickInput == null) - { - existingJoystickInput = Undo.AddComponent(mb.gameObject); - } + return; + } - var inputProviderProp = property.FindPropertyRelative("InputProvider"); - if (inputProviderProp != null) - { - inputProviderProp.objectReferenceValue = existingJoystickInput; - property.serializedObject.ApplyModifiedProperties(); - } + var existingInput = mb.GetComponent() ?? + Undo.AddComponent(mb.gameObject); + + var inputProviderProp = property.FindPropertyRelative("InputProvider"); + if (inputProviderProp != null) + { + inputProviderProp.objectReferenceValue = existingInput; + property.serializedObject.ApplyModifiedProperties(); } } } diff --git a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfigDrawer.cs.meta b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfigDrawer.cs.meta index e0e64a7..5957b4a 100644 --- a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfigDrawer.cs.meta +++ b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfigDrawer.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: b5f9a8b0eecae65459b6847a04caf82e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: b5f9a8b0eecae65459b6847a04caf82e \ No newline at end of file diff --git a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerEditorUtils.cs.meta b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerEditorUtils.cs.meta index bc6eaf2..9478246 100644 --- a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerEditorUtils.cs.meta +++ b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerEditorUtils.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: cdff0964209774b478160f79e20f8465 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: cdff0964209774b478160f79e20f8465 \ No newline at end of file diff --git a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInputEditor.cs b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInputEditor.cs index e890cac..e30e84e 100644 --- a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInputEditor.cs +++ b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInputEditor.cs @@ -9,6 +9,7 @@ namespace Meta.XR.Movement.AI.Editor public class AIMotionSynthesizerJoystickInputEditor : UnityEditor.Editor { private SerializedProperty _inputModeProperty, _referenceTransformProperty; + private SerializedProperty _movementDirectionModeProperty, _facingDirectionModeProperty, _lockDirectionOnInputStartProperty; #if USE_UNITY_INPUT_SYSTEM private SerializedProperty _moveActionProperty, _lookActionProperty, _sprintActionProperty; #endif @@ -23,6 +24,9 @@ private void OnEnable() { _inputModeProperty = serializedObject.FindProperty("_inputMode"); _referenceTransformProperty = serializedObject.FindProperty("_referenceTransform"); + _movementDirectionModeProperty = serializedObject.FindProperty("_movementDirectionMode"); + _facingDirectionModeProperty = serializedObject.FindProperty("_facingDirectionMode"); + _lockDirectionOnInputStartProperty = serializedObject.FindProperty("_lockDirectionOnInputStart"); #if USE_UNITY_INPUT_SYSTEM _moveActionProperty = serializedObject.FindProperty("_moveAction"); _lookActionProperty = serializedObject.FindProperty("_lookAction"); @@ -53,6 +57,9 @@ public override void OnInspectorGUI() { EditorGUILayout.PropertyField(_inputModeProperty); EditorGUILayout.PropertyField(_joystickThresholdProperty, new GUIContent("Dead Zone")); + EditorGUILayout.PropertyField(_movementDirectionModeProperty, new GUIContent("Movement Mode")); + EditorGUILayout.PropertyField(_facingDirectionModeProperty, new GUIContent("Direction Mode")); + EditorGUILayout.PropertyField(_lockDirectionOnInputStartProperty, new GUIContent("Lock Direction")); }); EditorGUILayout.Space(4); @@ -60,7 +67,16 @@ public override void OnInspectorGUI() AIMotionSynthesizerEditorUtils.DrawSection("Input Reference", _headerColor, () => { EditorGUILayout.PropertyField(_referenceTransformProperty, new GUIContent("Reference Transform")); - EditorGUILayout.HelpBox("Transform used for input calculations. Determines the coordinate space for velocity and direction. Defaults to camera rig if not set.", MessageType.Info); + + var mode = (MovementDirectionMode)_movementDirectionModeProperty.enumValueIndex; + if (mode == MovementDirectionMode.Relative) + { + EditorGUILayout.HelpBox("Relative: movement follows reference transform direction.", MessageType.Info); + } + else + { + EditorGUILayout.HelpBox("Absolute: joystick maps to world axes (Up=+Z, Right=+X).", MessageType.Info); + } }); EditorGUILayout.Space(4); diff --git a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInputEditor.cs.meta b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInputEditor.cs.meta index b7fcc63..788a14e 100644 --- a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInputEditor.cs.meta +++ b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInputEditor.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 8be2905dbd5bb4b4ba11cd89d16a54cb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 8be2905dbd5bb4b4ba11cd89d16a54cb \ No newline at end of file diff --git a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProviderEditor.cs b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProviderEditor.cs index c2840af..6bff198 100644 --- a/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProviderEditor.cs +++ b/Editor/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProviderEditor.cs @@ -8,12 +8,24 @@ namespace Meta.XR.Movement.AI.Editor [CustomEditor(typeof(AIMotionSynthesizerSourceDataProvider))] public class AIMotionSynthesizerSourceDataProviderEditor : UnityEditor.Editor { + private const string BasePath = "Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/"; + + private static readonly Color HeaderColor = new(0.3f, 0.5f, 0.7f, 0.2f); + + private static readonly (string prop, string path)[] DefaultAssets = + { + ("_config", "AIMotionSynthesizerSkeletonData.json"), + ("_modelAsset", "AIMotionSynthesizerModel.bytes"), + ("_guidanceAsset", "AIMotionSynthesizerGuidance.bytes") + }; + private SerializedProperty _configProperty; private SerializedProperty _modelAssetProperty; private SerializedProperty _guidanceAssetProperty; private SerializedProperty _inputProviderProperty; - - private static readonly Color _headerColor = new Color(0.3f, 0.5f, 0.7f, 0.2f); + private SerializedProperty _applyRootMotionProperty; + private SerializedProperty _debugDrawSkeletonProperty; + private SerializedProperty _debugSkeletonColorProperty; private void OnEnable() { @@ -21,24 +33,23 @@ private void OnEnable() _modelAssetProperty = serializedObject.FindProperty("_modelAsset"); _guidanceAssetProperty = serializedObject.FindProperty("_guidanceAsset"); _inputProviderProperty = serializedObject.FindProperty("_inputProvider"); + _applyRootMotionProperty = serializedObject.FindProperty("_applyRootMotion"); + _debugDrawSkeletonProperty = serializedObject.FindProperty("_debugDrawSkeleton"); + _debugSkeletonColorProperty = serializedObject.FindProperty("_debugSkeletonColor"); } public override void OnInspectorGUI() { serializedObject.Update(); - EditorGUI.BeginDisabledGroup(true); - EditorGUILayout.ObjectField("Script", MonoScript.FromMonoBehaviour((MonoBehaviour)target), GetType(), false); - EditorGUI.EndDisabledGroup(); - + DrawScriptField(); EditorGUILayout.Space(4); - AIMotionSynthesizerEditorUtils.DrawSection("AIMotionSynthesizer Configuration", _headerColor, () => + AIMotionSynthesizerEditorUtils.DrawSection("AIMotionSynthesizer Configuration", HeaderColor, () => { EditorGUILayout.PropertyField(_configProperty); EditorGUILayout.PropertyField(_modelAssetProperty); EditorGUILayout.PropertyField(_guidanceAssetProperty); - EditorGUILayout.Space(4); if (GUILayout.Button("Load Default Assets")) @@ -49,53 +60,64 @@ public override void OnInspectorGUI() EditorGUILayout.Space(4); - AIMotionSynthesizerEditorUtils.DrawSection("Input Control", _headerColor, () => + AIMotionSynthesizerEditorUtils.DrawSection("Input Control", HeaderColor, () => { EditorGUILayout.PropertyField(_inputProviderProperty, new GUIContent("Input Provider")); }); - serializedObject.ApplyModifiedProperties(); - } - - private void LoadDefaultAssets() - { - bool hasChanges = false; + EditorGUILayout.Space(4); - if (_configProperty.objectReferenceValue == null) + AIMotionSynthesizerEditorUtils.DrawSection("Root Motion", HeaderColor, () => { - var configFile = AssetDatabase.LoadAssetAtPath("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerSkeletonData.json"); - if (configFile != null) - { - _configProperty.objectReferenceValue = configFile; - hasChanges = true; - } - } + EditorGUILayout.PropertyField(_applyRootMotionProperty, new GUIContent("Apply Root Motion", + "Apply root motion (position and rotation) from the AI Motion Synthesizer to this transform")); + }); - if (_modelAssetProperty.objectReferenceValue == null) + EditorGUILayout.Space(4); + + AIMotionSynthesizerEditorUtils.DrawSection("Debug Visualization", HeaderColor, () => { - var modelFile = AssetDatabase.LoadAssetAtPath("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerModel.bytes"); - if (modelFile != null) + EditorGUILayout.PropertyField(_debugDrawSkeletonProperty, new GUIContent("Draw Skeleton")); + if (_debugDrawSkeletonProperty.boolValue) { - _modelAssetProperty.objectReferenceValue = modelFile; - hasChanges = true; + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_debugSkeletonColorProperty, new GUIContent("Skeleton Color")); + EditorGUI.indentLevel--; } - } + }); + + serializedObject.ApplyModifiedProperties(); + } + + private void DrawScriptField() + { + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.ObjectField("Script", MonoScript.FromMonoBehaviour((MonoBehaviour)target), GetType(), false); + EditorGUI.EndDisabledGroup(); + } + + private void LoadDefaultAssets() + { + bool hasChanges = false; - if (_guidanceAssetProperty.objectReferenceValue == null) + foreach (var (prop, path) in DefaultAssets) { - var guidanceFile = AssetDatabase.LoadAssetAtPath("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerGuidance.bytes"); - if (guidanceFile != null) + var property = serializedObject.FindProperty(prop); + if (property?.objectReferenceValue == null) { - _guidanceAssetProperty.objectReferenceValue = guidanceFile; - hasChanges = true; + var asset = AssetDatabase.LoadAssetAtPath(BasePath + path); + if (asset != null) + { + property.objectReferenceValue = asset; + hasChanges = true; + } } } if (_inputProviderProperty.objectReferenceValue == null) { var provider = (AIMotionSynthesizerSourceDataProvider)target; - var inputProviders = provider.GetComponents(); - foreach (var component in inputProviders) + foreach (var component in provider.GetComponents()) { if (component is IAIMotionSynthesizerInputProvider) { diff --git a/Editor/Native/Scripts/Retargeting/MetaSourceDataProviderEditor.cs.meta b/Editor/Native/Scripts/Retargeting/MetaSourceDataProviderEditor.cs.meta index a3aa4db..1cc2eb4 100644 --- a/Editor/Native/Scripts/Retargeting/MetaSourceDataProviderEditor.cs.meta +++ b/Editor/Native/Scripts/Retargeting/MetaSourceDataProviderEditor.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: c70321eec39223c499d46bb98609669f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: c70321eec39223c499d46bb98609669f \ No newline at end of file diff --git a/README.md b/README.md index ea608a9..7ab9cea 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Unity-Movement is a package that uses OpenXR’s tracking layer APIs to expose B The Unity-Movement package is released under the [Oculus License](https://github.com/oculus-samples/Unity-Movement/blob/main/LICENSE.md). The MIT License applies to only certain, clearly marked documents. If an individual file does not indicate which license it is subject to, then the Oculus License applies. ### Requirements -- Unity 2022.3.15f1 or newer. +- Unity 6000.0.66f2 or newer. - v81.0 or newer of the Meta XR SDK. You will need the [Meta XR Core SDK](https://assetstore.unity.com/packages/tools/integration/meta-xr-core-sdk-269169) and the [Meta XR Interaction SDK](https://assetstore.unity.com/packages/tools/integration/meta-xr-interaction-sdk-265014) packages found [on this page](https://assetstore.unity.com/publishers/25353). - A project set up with these [steps](https://developer.oculus.com/documentation/unity/move-overview/#unity-project-setup). diff --git a/Runtime/Native/Data/AIMotionSynthesizerSkeletonData.json b/Runtime/Native/Data/AIMotionSynthesizerSkeletonData.json index 88adea0..abc20cd 100644 --- a/Runtime/Native/Data/AIMotionSynthesizerSkeletonData.json +++ b/Runtime/Native/Data/AIMotionSynthesizerSkeletonData.json @@ -1246,8 +1246,8 @@ "Root": { "position": { "x": 0.0, - "y": 0.0079347622, - "z": -0.0037700688 + "y": 0.0079348059, + "z": -0.0037700462 }, "rotation": { "x": -0.0, @@ -1259,8 +1259,8 @@ "Hips": { "position": { "x": 0.0, - "y": 0.7068887353, - "z": -0.0037700688 + "y": 0.7068888545, + "z": -0.0037700462 }, "rotation": { "x": 0.5, @@ -1272,8 +1272,8 @@ "SpineLower": { "position": { "x": 0.0, - "y": 0.7221843004, - "z": -0.0283818357 + "y": 0.722184062, + "z": -0.0283817947 }, "rotation": { "x": 0.5, @@ -1285,8 +1285,8 @@ "SpineMiddle": { "position": { "x": 0.0, - "y": 0.8057054281, - "z": -0.0200320389 + "y": 0.8057051897, + "z": -0.0200319849 }, "rotation": { "x": 0.5, @@ -1298,8 +1298,8 @@ "SpineUpper": { "position": { "x": 0.0, - "y": 0.8884372115, - "z": -0.0396643467 + "y": 0.8884369135, + "z": -0.0396642424 }, "rotation": { "x": 0.5213338733, @@ -1312,1027 +1312,1027 @@ "position": { "x": 0.0, "y": 1.026663065, - "z": -0.0197341871 + "z": -0.0197341647 }, "rotation": { - "x": 0.5434916019, - "y": -0.4523459673, - "z": -0.5434916019, - "w": 0.4523459673 + "x": 0.5434915423, + "y": -0.4523460269, + "z": -0.5434915423, + "w": 0.4523460269 } }, "Neck": { "position": { "x": 0.0, - "y": 1.0991566181, - "z": 0.0486744009 + "y": 1.1254931688, + "z": 0.0582793541 }, "rotation": { - "x": 0.5792281628, + "x": 0.5792281032, "y": -0.4055796862, - "z": -0.5792281628, + "z": -0.5792281032, "w": 0.4055796862 } }, "Head": { "position": { - "x": -2.818010003e-8, - "y": 1.142000556, - "z": 0.0806706324 + "x": -2.254408393e-8, + "y": 1.1683362722, + "z": 0.0902757421 }, "rotation": { "x": 0.5978850126, - "y": -0.3775362074, + "y": -0.3775362968, "z": -0.5978850126, - "w": 0.3775362074 + "w": 0.3775362968 } }, "LeftShoulder": { "position": { - "x": -0.0213455521, - "y": 1.0631240606, - "z": 0.0599154234 + "x": -0.021345403, + "y": 1.063123703, + "z": 0.0599158294 }, "rotation": { - "x": 0.6626185179, - "y": -0.3457877934, - "z": -0.0511740744, - "w": 0.6623811722 + "x": 0.7295367718, + "y": -0.162507534, + "z": 0.1220059395, + "w": 0.6530559063 } }, "LeftScapula": { "position": { - "x": -0.098456651, - "y": 1.145660758, - "z": 0.0085714115 + "x": -0.1293949783, + "y": 1.0960468054, + "z": 0.0085711377 }, "rotation": { - "x": 0.707867384, - "y": -0.0300345719, - "z": 0.0239603221, - "w": 0.7052996159 + "x": 0.7078680396, + "y": -0.0300341249, + "z": 0.0239604712, + "w": 0.705299139 } }, "LeftArmUpper": { "position": { - "x": -0.1087741479, - "y": 1.1229891777, - "z": 0.0085104583 + "x": -0.1397130787, + "y": 1.0733759403, + "z": 0.0085100662 }, "rotation": { - "x": 0.5279536247, - "y": 0.0080473125, - "z": 0.0365847051, - "w": 0.848446846 + "x": 0.6091191769, + "y": -0.0410278141, + "z": 0.0224253833, + "w": 0.7916994095 } }, "LeftArmLower": { "position": { - "x": -0.2962878644, - "y": 1.1097121239, - "z": 0.0043019294 + "x": -0.326967895, + "y": 1.0759943724, + "z": -0.0083679566 }, "rotation": { - "x": 0.5117800236, - "y": -0.0181746781, - "z": 0.0563103855, - "w": 0.8570764661 + "x": 0.5923503637, + "y": -0.0687437356, + "z": 0.03858307, + "w": 0.8018147945 } }, "LeftHandWristTwist": { "position": { - "x": -0.465128392, - "y": 1.0964142084, - "z": -0.0107159903 + "x": -0.4948970079, + "y": 1.0792576075, + "z": -0.0348164067 }, "rotation": { - "x": 0.5410481691, - "y": 0.0233803689, - "z": 0.0940641463, - "w": 0.8353875875 + "x": 0.6196132898, + "y": -0.0316426754, + "z": 0.0819684863, + "w": 0.7799741626 } }, "RightShoulder": { "position": { - "x": 0.0213454179, - "y": 1.0631240606, - "z": 0.0599158294 + "x": 0.0213454664, + "y": 1.063123703, + "z": 0.05991574 }, "rotation": { - "x": -0.6623899341, - "y": -0.0511410236, - "z": 0.3458037078, - "w": 0.6626040339 + "x": -0.6530560851, + "y": 0.1220400482, + "z": 0.1625268161, + "w": 0.7295266986 } }, "RightScapula": { "position": { - "x": 0.0984527841, - "y": 1.1456625462, - "z": 0.008562332 + "x": 0.1293910742, + "y": 1.0960509777, + "z": 0.008562075 }, "rotation": { - "x": -0.7053014636, - "y": 0.0239857435, - "z": 0.0300637484, - "w": 0.7078635097 + "x": -0.7053018808, + "y": 0.0239862129, + "z": 0.0300627891, + "w": 0.7078632116 } }, "RightArmUpper": { "position": { - "x": 0.108770676, - "y": 1.122985363, - "z": 0.0085002454 + "x": 0.1397091299, + "y": 1.0733748674, + "z": 0.0085002482 }, "rotation": { - "x": -0.7477726936, - "y": 0.0397672281, - "z": -0.0177090522, - "w": 0.6625263691 + "x": -0.7917090058, + "y": 0.0222424865, + "z": 0.040827632, + "w": 0.6091268063 } }, "RightArmLower": { "position": { - "x": 0.2960849702, - "y": 1.1072241068, - "z": 0.0040334747 + "x": 0.3269708157, + "y": 1.0760029554, + "z": -0.0082722344 }, "rotation": { - "x": -0.759082377, - "y": 0.0554314218, - "z": 0.0119126998, - "w": 0.6485212445 + "x": -0.8018188477, + "y": 0.0387372747, + "z": 0.0689325705, + "w": 0.592312932 } }, "RightHandWristTwist": { "position": { - "x": 0.4650222957, - "y": 1.0954691172, - "z": -0.0112092094 + "x": 0.494886905, + "y": 1.0792617798, + "z": -0.0348052233 }, "rotation": { - "x": -0.7820999622, - "y": 0.1004990414, - "z": -0.0150336567, - "w": 0.6148121953 + "x": -0.8257989287, + "y": 0.0794073045, + "z": 0.0381155908, + "w": 0.5570444465 } }, "LeftHandPalm": { "position": { - "x": -0.5183410048, - "y": 1.0785752535, - "z": -0.0219571907 + "x": -0.5052111745, + "y": 1.0880624056, + "z": 0.0183089543 }, "rotation": { - "x": 0.9714930058, - "y": 0.0313698053, - "z": 0.0207183957, - "w": 0.2340691686 + "x": 0.9884679317, + "y": -0.0203258246, + "z": 0.0700883716, + "w": 0.1326885968 } }, "LeftHandWrist": { "position": { - "x": -0.5139357448, - "y": 1.0786169767, - "z": -0.0240302086 + "x": -0.5139423013, + "y": 1.0786185265, + "z": -0.0240314975 }, "rotation": { - "x": 0.9710913897, - "y": 0.0337303579, - "z": -0.0267706811, - "w": 0.2347927541 + "x": 0.99071455, + "y": -0.0064448416, + "z": -0.0019369125, + "w": 0.1357938796 } }, "LeftHandThumbMetacarpal": { "position": { - "x": -0.539136827, - "y": 1.0740212202, - "z": 0.0032321226 + "x": -0.5411986113, + "y": 1.0707274675, + "z": 0.0003452412 }, "rotation": { - "x": -0.79906106, - "y": 0.087472856, - "z": 0.4044395089, - "w": 0.4362096786 + "x": -0.759495914, + "y": 0.062035054, + "z": 0.3702401817, + "w": 0.5312627554 } }, "LeftHandThumbProximal": { "position": { - "x": -0.5553092957, - "y": 1.0687812567, - "z": 0.0210061911 + "x": -0.5588609576, + "y": 1.0633705854, + "z": 0.0157984439 }, "rotation": { - "x": -0.8509469032, - "y": 0.1538925171, - "z": 0.3828189969, - "w": 0.3250484467 + "x": -0.8191446662, + "y": 0.135527581, + "z": 0.3578909934, + "w": 0.4272571504 } }, "LeftHandThumbDistal": { "position": { - "x": -0.5721676946, - "y": 1.0691137314, - "z": 0.0402187072 + "x": -0.576937139, + "y": 1.0612286329, + "z": 0.033747185 }, "rotation": { - "x": -0.7837145329, - "y": 0.2131872475, - "z": 0.4414280653, - "w": 0.381423533 + "x": -0.7463003397, + "y": 0.1843784899, + "z": 0.4221038818, + "w": 0.4804883599 } }, "LeftHandThumbTip": { "position": { - "x": -0.5780090094, - "y": 1.0690852404, - "z": 0.0498267673 + "x": -0.5834100842, + "y": 1.0597633123, + "z": 0.0428229384 }, "rotation": { - "x": -0.7837145925, - "y": 0.2131883204, - "z": 0.4414292276, - "w": 0.3814223111 + "x": -0.7463008165, + "y": 0.1843775362, + "z": 0.4221030474, + "w": 0.4804887176 } }, "LeftHandIndexMetacarpal": { "position": { - "x": -0.5139357448, - "y": 1.0786169767, - "z": -0.0240302086 + "x": -0.5139423013, + "y": 1.0786185265, + "z": -0.0240314975 }, "rotation": { - "x": 0.9710918069, - "y": 0.0337324739, - "z": -0.0267700851, - "w": 0.2347905189 + "x": 0.9907143116, + "y": -0.0064455271, + "z": -0.0019363165, + "w": 0.1357945204 } }, "LeftHandIndexProximal": { "position": { - "x": -0.5852065682, - "y": 1.0780154467, - "z": -0.0007645821 + "x": -0.5865200758, + "y": 1.0790474415, + "z": -0.0052324357 }, "rotation": { - "x": 0.9757088423, - "y": 0.076335758, - "z": -0.0274315774, - "w": 0.2035022974 + "x": 0.9937334061, + "y": 0.0367521942, + "z": 0.0029699504, + "w": 0.1055241525 } }, "LeftHandIndexIntermediate": { "position": { - "x": -0.6135175824, - "y": 1.0740619898, - "z": 0.001662739 + "x": -0.615134418, + "y": 1.0769336224, + "z": -0.0051797275 }, "rotation": { - "x": 0.9700347185, - "y": 0.0816788375, - "z": -0.0191774368, - "w": 0.2280215472 + "x": 0.9905006886, + "y": 0.0406878293, + "z": 0.0106436908, + "w": 0.1309214979 } }, "LeftHandIndexDistal": { "position": { - "x": -0.6316443682, - "y": 1.0713098049, - "z": 0.0030306687 + "x": -0.6334525347, + "y": 1.0753996372, + "z": -0.0053714425 }, "rotation": { - "x": 0.9697737098, - "y": 0.0180499852, - "z": 0.0249563754, - "w": 0.242054671 + "x": 0.9879727364, + "y": -0.0274045467, + "z": 0.0475882739, + "w": 0.1445515007 } }, "LeftHandIndexTip": { "position": { - "x": -0.6403899789, - "y": 1.0708976984, - "z": 0.002684121 + "x": -0.642162621, + "y": 1.0757539272, + "z": -0.006264729 }, "rotation": { - "x": 0.9697731733, - "y": 0.0180492997, - "z": 0.024956435, - "w": 0.2420572788 + "x": 0.9879727364, + "y": -0.0274049044, + "z": 0.047588408, + "w": 0.1445510685 } }, "LeftHandMiddleMetacarpal": { "position": { - "x": -0.5139357448, - "y": 1.0786169767, - "z": -0.0240302086 + "x": -0.5139423013, + "y": 1.0786185265, + "z": -0.0240314975 }, "rotation": { - "x": 0.9710918069, - "y": 0.0337324739, - "z": -0.0267700851, - "w": 0.2347905189 + "x": 0.9907143116, + "y": -0.0064455271, + "z": -0.0019363165, + "w": 0.1357945204 } }, "LeftHandMiddleProximal": { "position": { - "x": -0.5858221054, - "y": 1.0736758709, - "z": -0.0170880742 + "x": -0.5863029361, + "y": 1.0780794621, + "z": -0.0221053753 }, "rotation": { - "x": 0.9661113024, - "y": 0.0810464323, - "z": -0.0272711217, - "w": 0.2435504943 + "x": 0.9883879423, + "y": 0.040538311, + "z": 0.0018478632, + "w": 0.1464345604 } }, "LeftHandMiddleIntermediate": { "position": { - "x": -0.6178197861, - "y": 1.0690215826, - "z": -0.0140948975 + "x": -0.6186683178, + "y": 1.0754586458, + "z": -0.0218386333 }, "rotation": { - "x": 0.9635846019, - "y": 0.0805011392, - "z": -0.021648109, - "w": 0.2540787458 + "x": 0.9867421389, + "y": 0.0392018855, + "z": 0.0069220364, + "w": 0.1573409736 } }, "LeftHandMiddleDistal": { "position": { - "x": -0.6383701563, - "y": 1.0660179853, - "z": -0.0123732956 + "x": -0.639441967, + "y": 1.0738021135, + "z": -0.0218660012 }, "rotation": { - "x": 0.9576952457, - "y": -0.0075997114, - "z": 0.0092986226, - "w": 0.287535131 + "x": 0.9800850153, + "y": -0.0522769094, + "z": 0.027418375, + "w": 0.1896036267 } }, "LeftHandMiddleTip": { "position": { - "x": -0.6475983858, - "y": 1.06610322, - "z": -0.0125778159 + "x": -0.6486099362, + "y": 1.0746507645, + "z": -0.0225451197 }, "rotation": { - "x": 0.9576944113, - "y": -0.0075984895, - "z": 0.0092999637, - "w": 0.2875373065 + "x": 0.9800848961, + "y": -0.0522771776, + "z": 0.0274174511, + "w": 0.1896041632 } }, "LeftHandRingMetacarpal": { "position": { - "x": -0.5139357448, - "y": 1.0786169767, - "z": -0.0240302086 + "x": -0.5139423013, + "y": 1.0786185265, + "z": -0.0240314975 }, "rotation": { - "x": 0.9710918069, - "y": 0.0337324739, - "z": -0.0267700851, - "w": 0.2347905189 + "x": 0.9907143116, + "y": -0.0064455271, + "z": -0.0019363165, + "w": 0.1357945204 } }, "LeftHandRingProximal": { "position": { - "x": -0.5808708072, - "y": 1.0646320581, - "z": -0.0289716013 + "x": -0.5811632872, + "y": 1.0711989403, + "z": -0.0352872163 }, "rotation": { - "x": 0.953579545, - "y": 0.0788694322, - "z": -0.0260121226, - "w": 0.2894644141 + "x": 0.9804306626, + "y": 0.0372956395, + "z": 0.0008201003, + "w": 0.1932992786 } }, "LeftHandRingIntermediate": { "position": { - "x": -0.6099622846, - "y": 1.0606387854, - "z": -0.0261608046 + "x": -0.610578537, + "y": 1.0690321922, + "z": -0.034908928 }, "rotation": { - "x": 0.942910552, - "y": 0.0859194696, - "z": -0.0223284662, - "w": 0.3209974766 + "x": 0.9731416106, + "y": 0.0433527231, + "z": 0.0037145317, + "w": 0.2260593027 } }, "LeftHandRingDistal": { "position": { - "x": -0.6297479272, - "y": 1.0576685667, - "z": -0.0242056474 + "x": -0.630605042, + "y": 1.0673025846, + "z": -0.034660086 }, "rotation": { - "x": 0.9425907135, - "y": 0.0529682934, - "z": -0.0414924324, - "w": 0.3271024227 + "x": 0.9728230238, + "y": 0.0123533905, + "z": -0.0188774467, + "w": 0.2304500192 } }, "LeftHandRingTip": { "position": { - "x": -0.6386983395, - "y": 1.0570122004, - "z": -0.0231861137 + "x": -0.639627099, + "y": 1.0671644211, + "z": -0.0342767462 }, "rotation": { - "x": 0.9425907135, - "y": 0.0529677272, - "z": -0.0414924026, - "w": 0.3271024227 + "x": 0.9728230238, + "y": 0.0123523772, + "z": -0.0188783705, + "w": 0.230449155 } }, "LeftHandLittleMetacarpal": { "position": { - "x": -0.5396883488, - "y": 1.062962532, - "z": -0.0344994552 + "x": -0.5398988724, + "y": 1.0674182177, + "z": -0.0388161801 }, "rotation": { - "x": 0.8945853114, - "y": 0.0889314711, - "z": 0.1130551994, - "w": 0.4231161475 + "x": 0.9313278198, + "y": 0.0313620567, + "z": 0.1333454251, + "w": 0.337438345 } }, "LeftHandLittleProximal": { "position": { - "x": -0.5727921724, - "y": 1.0541651249, - "z": -0.0388838723 + "x": -0.5731354952, + "y": 1.0622937679, + "z": -0.0466602556 }, "rotation": { - "x": 0.9302960634, - "y": 0.0867983699, - "z": -0.0222892165, - "w": 0.3556950092 + "x": 0.964122951, + "y": 0.0436132252, + "z": 0.0021841824, + "w": 0.2618409693 } }, "LeftHandLittleIntermediate": { "position": { - "x": -0.5956559777, - "y": 1.0507810116, - "z": -0.0364854969 + "x": -0.59628582, + "y": 1.0603128672, + "z": -0.0462275445 }, "rotation": { - "x": 0.9174253941, - "y": 0.0903973281, - "z": 0.0256840289, - "w": 0.3866517246 + "x": 0.9531006813, + "y": 0.0418882966, + "z": 0.0486983657, + "w": 0.2957587242 } }, "LeftHandLittleDistal": { "position": { - "x": -0.610751152, - "y": 1.0479279757, - "z": -0.036135748 + "x": -0.611523807, + "y": 1.0586438179, + "z": -0.0472730957 }, "rotation": { - "x": 0.9197347164, - "y": 0.0492317975, - "z": -0.0102353394, - "w": 0.3893074393 + "x": 0.9552645683, + "y": 0.0044228137, + "z": 0.0088355243, + "w": 0.2955879867 } }, "LeftHandLittleTip": { "position": { - "x": -0.6197134256, - "y": 1.0471827984, - "z": -0.0356203467 + "x": -0.6205301285, + "y": 1.0585210323, + "z": -0.047401417 }, "rotation": { - "x": 0.9197348356, - "y": 0.0492319763, - "z": -0.0102362335, - "w": 0.3893067837 + "x": 0.9552650452, + "y": 0.0044222176, + "z": 0.0088345408, + "w": 0.2955873609 } }, "RightHandPalm": { "position": { - "x": 0.5182842612, - "y": 1.0777895451, - "z": -0.0220006555 + "x": 0.5043665171, + "y": 1.091178894, + "z": 0.0132069569 }, "rotation": { - "x": -0.0678964406, - "y": 0.0167063624, - "z": -0.0403710455, - "w": 0.9967356324 + "x": -0.1340727061, + "y": 0.0714143366, + "z": 0.0105041862, + "w": 0.9883397222 } }, "RightHandWrist": { "position": { - "x": 0.5139359236, - "y": 1.0786178112, - "z": -0.0240302086 + "x": 0.5139388442, + "y": 1.0786209106, + "z": -0.0240300093 }, "rotation": { - "x": -0.0691455603, - "y": -0.0297711492, - "z": -0.050647676, - "w": 0.9958754778 + "x": -0.1358067244, + "y": -0.0017627478, + "z": 0.006460011, + "w": 0.9907130599 } }, "RightHandThumbMetacarpal": { "position": { - "x": 0.5383203626, - "y": 1.0646914244, - "z": 0.0006877526 + "x": 0.5412051678, + "y": 1.070731163, + "z": 0.0003378016 }, "rotation": { - "x": 0.5582311153, - "y": -0.4273146391, - "z": 0.0154784024, - "w": 0.7110142112 + "x": 0.5312590599, + "y": -0.370113194, + "z": 0.0619419515, + "w": 0.7595682144 } }, "RightHandThumbProximal": { "position": { - "x": 0.5539212823, - "y": 1.053498745, - "z": 0.0160588473 + "x": 0.5588739514, + "y": 1.0633741617, + "z": 0.0157852788 }, "rotation": { - "x": 0.4567526281, - "y": -0.4165425301, - "z": 0.0827155411, - "w": 0.7816829085 + "x": 0.4272666872, + "y": -0.3577483296, + "z": 0.1354541779, + "w": 0.8192144632 } }, "RightHandThumbDistal": { "position": { - "x": 0.5702643991, - "y": 1.0470770597, - "z": 0.0346382819 + "x": 0.5769562721, + "y": 1.0612328053, + "z": 0.0337280706 }, "rotation": { - "x": 0.4997875988, - "y": -0.4840205312, - "z": 0.1327462941, - "w": 0.7059147358 + "x": 0.4805044234, + "y": -0.4219793379, + "z": 0.1842953861, + "w": 0.7463811636 } }, "RightHandThumbTip": { "position": { - "x": 0.5758432746, - "y": 1.0437442064, - "z": 0.043813359 + "x": 0.5834299326, + "y": 1.0597661734, + "z": 0.0428024679 }, "rotation": { - "x": 0.4840213358, - "y": 0.4997866452, - "z": -0.7059150338, - "w": 0.1327451169 + "x": 0.4219791293, + "y": 0.4805030227, + "z": -0.7463829517, + "w": 0.1842925847 } }, "RightHandIndexMetacarpal": { "position": { - "x": 0.5139359236, - "y": 1.0786178112, - "z": -0.0240302086 + "x": 0.5139388442, + "y": 1.0786209106, + "z": -0.0240300093 }, "rotation": { - "x": -0.0691453815, - "y": -0.0297714323, - "z": -0.0506473631, - "w": 0.9958755374 + "x": -0.1358074099, + "y": -0.0017630309, + "z": 0.0064595491, + "w": 0.9907130003 } }, "RightHandIndexProximal": { "position": { - "x": 0.5845388174, - "y": 1.0686452389, - "z": -0.0008568325 + "x": 0.586524725, + "y": 1.0790492296, + "z": -0.0052558817 }, "rotation": { - "x": -0.0370341837, - "y": -0.0236815512, - "z": -0.0924392641, - "w": 0.9947477579 + "x": -0.1055425555, + "y": 0.0031501353, + "z": -0.0367455333, + "w": 0.9937310219 } }, "RightHandIndexIntermediate": { "position": { - "x": 0.6127075553, - "y": 1.0634200573, - "z": 0.0006923516 + "x": 0.6151377559, + "y": 1.0769373178, + "z": -0.0052130027 }, "rotation": { - "x": -0.062005192, - "y": -0.0143292248, - "z": -0.0965544134, - "w": 0.993291378 + "x": -0.1309460104, + "y": 0.0108229667, + "z": -0.0406741947, + "w": 0.990496099 } }, "RightHandIndexDistal": { "position": { - "x": 0.630743444, - "y": 1.059926033, - "z": 0.0014354496 + "x": 0.6334567666, + "y": 1.0754028559, + "z": -0.0054109851 }, "rotation": { - "x": -0.0761726201, - "y": 0.0187031329, - "z": -0.0266193599, - "w": 0.9965640306 + "x": -0.1445554793, + "y": 0.0477674454, + "z": 0.0274186581, + "w": 0.9879630208 } }, "RightHandIndexTip": { "position": { - "x": 0.6394860744, - "y": 1.0594351292, - "z": 0.001144631 + "x": 0.6421667337, + "y": 1.0757565498, + "z": -0.0063078334 }, "rotation": { - "x": -0.0761681199, - "y": 0.0187036991, - "z": -0.0266207606, - "w": 0.9965643287 + "x": -0.1445560455, + "y": 0.0477679968, + "z": 0.0274185538, + "w": 0.9879629016 } }, "RightHandMiddleMetacarpal": { "position": { - "x": 0.5139359236, - "y": 1.0786178112, - "z": -0.0240302086 + "x": 0.5139388442, + "y": 1.0786209106, + "z": -0.0240300093 }, "rotation": { - "x": -0.0691453815, - "y": -0.0297714323, - "z": -0.0506473631, - "w": 0.9958755374 + "x": -0.1358074099, + "y": -0.0017630309, + "z": 0.0064595491, + "w": 0.9907130003 } }, "RightHandMiddleProximal": { "position": { - "x": 0.5855208635, - "y": 1.0699055195, - "z": -0.0176832378 + "x": 0.5863032937, + "y": 1.0780807734, + "z": -0.0221292265 }, "rotation": { - "x": -0.078060478, - "y": -0.0222013295, - "z": -0.097428292, - "w": 0.9919283986 + "x": -0.1464551091, + "y": 0.0020297021, + "z": -0.0405239016, + "w": 0.9883853793 } }, "RightHandMiddleIntermediate": { "position": { - "x": 0.6173416376, - "y": 1.0637427568, - "z": -0.0157581996 + "x": 0.6186668873, + "y": 1.0754615068, + "z": -0.0218733512 }, "rotation": { - "x": -0.0888085961, - "y": -0.016607523, - "z": -0.0960505605, - "w": 0.9912679195 + "x": -0.1573589444, + "y": 0.0071013719, + "z": -0.0391847342, + "w": 0.9867386222 } }, "RightHandMiddleDistal": { "position": { - "x": 0.6377862096, - "y": 1.0598379374, - "z": -0.0147166178 + "x": 0.6394420862, + "y": 1.0738039017, + "z": -0.0219087899 }, "rotation": { - "x": -0.1234881729, - "y": -0.0004012734, - "z": -0.0043579489, - "w": 0.9923366308 + "x": -0.1896063685, + "y": 0.0275968462, + "z": 0.0523029119, + "w": 0.9800781608 } }, "RightHandMiddleTip": { "position": { - "x": 0.6470187902, - "y": 1.0597563982, - "z": -0.0146995299 + "x": 0.6486086845, + "y": 1.0746526718, + "z": -0.0225909296 }, "rotation": { - "x": -0.1234907806, - "y": -0.0003993809, - "z": -0.0043595135, - "w": 0.9923365712 + "x": -0.1896042377, + "y": 0.0275974274, + "z": 0.0523031354, + "w": 0.9800783992 } }, "RightHandRingMetacarpal": { "position": { - "x": 0.5139359236, - "y": 1.0786178112, - "z": -0.0240302086 + "x": 0.5139388442, + "y": 1.0786209106, + "z": -0.0240300093 }, "rotation": { - "x": -0.0691453815, - "y": -0.0297714323, - "z": -0.0506473631, - "w": 0.9958755374 + "x": -0.1358074099, + "y": -0.0017630309, + "z": 0.0064595491, + "w": 0.9907130003 } }, "RightHandRingProximal": { "position": { - "x": 0.5807384849, - "y": 1.0654014349, - "z": -0.0319784395 + "x": 0.5811569095, + "y": 1.0712006092, + "z": -0.0353084542 }, "rotation": { - "x": -0.1254269183, - "y": -0.020696491, - "z": -0.0954835117, - "w": 0.9872808456 + "x": -0.1933190823, + "y": 0.0010006428, + "z": -0.0372727513, + "w": 0.9804276228 } }, "RightHandRingIntermediate": { "position": { - "x": 0.6096735001, - "y": 1.0599924326, - "z": -0.0300662518 + "x": 0.610573113, + "y": 1.0690350533, + "z": -0.0349409394 }, "rotation": { - "x": -0.1581736505, - "y": -0.0154313147, - "z": -0.1020767987, - "w": 0.9819998741 + "x": -0.2260816097, + "y": 0.0038909912, + "z": -0.0433204174, + "w": 0.9731371403 } }, "RightHandRingDistal": { "position": { - "x": 0.6293479204, - "y": 1.0560605526, - "z": -0.0288083814 + "x": 0.6305978298, + "y": 1.0673053265, + "z": -0.0346991308 }, "rotation": { - "x": -0.1648370773, - "y": -0.0397625417, - "z": -0.0728590935, - "w": 0.9828224778 + "x": -0.2304659635, + "y": -0.0187005997, + "z": -0.0123212934, + "w": 0.9728230834 } }, "RightHandRingTip": { "position": { - "x": 0.63825351, - "y": 1.0548844337, - "z": -0.0278857425 + "x": 0.6396209598, + "y": 1.0671666861, + "z": -0.0343193561 }, "rotation": { - "x": -0.1648394167, - "y": -0.0397619754, - "z": -0.0728599578, - "w": 0.982822001 + "x": -0.2304658145, + "y": -0.0187007338, + "z": -0.0123212487, + "w": 0.972823143 } }, "RightHandLittleMetacarpal": { "position": { - "x": 0.5396963358, - "y": 1.0666538477, - "z": -0.0385624394 + "x": 0.5398920178, + "y": 1.0674208403, + "z": -0.0388231687 }, "rotation": { - "x": -0.2654665709, - "y": 0.1201661974, - "z": -0.0831346661, - "w": 0.9529830813 + "x": -0.337456286, + "y": 0.133510232, + "z": -0.0313141942, + "w": 0.9312993288 } }, "RightHandLittleProximal": { "position": { - "x": 0.5727538466, - "y": 1.0589799881, - "z": -0.0449458845 + "x": 0.5731259584, + "y": 1.0622947216, + "z": -0.0466790572 }, "rotation": { - "x": -0.1944769025, - "y": -0.0147377849, - "z": -0.1032116413, - "w": 0.975350976 + "x": -0.2618614733, + "y": 0.0023573488, + "z": -0.0435746461, + "w": 0.9641187787 } }, "RightHandLittleIntermediate": { "position": { - "x": 0.5954867601, - "y": 1.0544344187, - "z": -0.043344263 + "x": 0.5962756872, + "y": 1.0603147745, + "z": -0.0462541021 }, "rotation": { - "x": -0.2265938222, - "y": 0.0336358249, - "z": -0.0989843309, - "w": 0.9683629274 + "x": -0.2957772315, + "y": 0.0488713533, + "z": -0.0418478101, + "w": 0.9530880451 } }, "RightHandLittleDistal": { "position": { - "x": 0.6105164886, - "y": 1.0512559414, - "z": -0.0436551459 + "x": 0.611512959, + "y": 1.0586436987, + "z": -0.0473057404 }, "rotation": { - "x": -0.2296887636, - "y": -0.0086555481, - "z": -0.0644545555, - "w": 0.9710892439 + "x": -0.2956040502, + "y": 0.009009853, + "z": -0.004379496, + "w": 0.9552582502 } }, "RightHandLittleTip": { "position": { - "x": 0.6194478273, - "y": 1.0501638651, - "z": -0.043236997 + "x": 0.6205199957, + "y": 1.0585206747, + "z": -0.0474370793 }, "rotation": { - "x": -0.2296888679, - "y": -0.0086547136, - "z": -0.0644557476, - "w": 0.9710892439 + "x": -0.2956055701, + "y": 0.0090091527, + "z": -0.0043798387, + "w": 0.955257833 } }, "LeftUpperLeg": { "position": { - "x": -0.0604174472, - "y": 0.6875998378, - "z": -0.0077664186 + "x": -0.0604174361, + "y": 0.6875997782, + "z": -0.0077663902 }, "rotation": { - "x": -0.5023018122, - "y": -0.509073019, - "z": 0.4913885593, - "w": 0.4970663786 + "x": -0.5023018718, + "y": -0.5090729594, + "z": 0.4913884699, + "w": 0.4970664084 } }, "LeftLowerLeg": { "position": { - "x": -0.0601603203, - "y": 0.37005952, - "z": -0.0058687651 + "x": -0.0601602979, + "y": 0.3700663745, + "z": -0.0058688326 }, "rotation": { - "x": -0.5070456862, - "y": -0.5044981837, - "z": 0.4958688617, - "w": 0.4924435019 + "x": -0.5070456266, + "y": -0.5044982433, + "z": 0.4958689213, + "w": 0.4924434423 } }, "LeftFootAnkleTwist": { "position": { - "x": -0.0599027649, - "y": 0.051907666, - "z": -0.0039675999 + "x": -0.0599027425, + "y": 0.0519165099, + "z": -0.0039676223 }, "rotation": { - "x": -0.4868090451, - "y": -0.5059353709, - "z": 0.522864759, - "w": 0.4833832085 + "x": -0.5066723824, + "y": -0.4851412475, + "z": 0.5240092278, + "w": 0.4830483794 } }, "LeftFootAnkle": { "position": { - "x": -0.0599027649, - "y": 0.0519068092, - "z": -0.0039675999 + "x": -0.0599027202, + "y": 0.0519157462, + "z": -0.0039676167 }, "rotation": { - "x": 0.0583179295, - "y": -0.7403144836, - "z": 0.0647700727, - "w": 0.6665875912 + "x": 0.0583191216, + "y": -0.7403146029, + "z": 0.0647688061, + "w": 0.666587472 } }, "LeftFootSubtalar": { "position": { - "x": -0.0669967607, - "y": 0.0263674781, - "z": 0.00009998898167 + "x": -0.0669966489, + "y": 0.0263800155, + "z": 0.00009996716108 }, "rotation": { - "x": -0.2156729251, - "y": -0.7455875874, - "z": 0.2862100303, - "w": 0.5618439913 + "x": -0.2156741172, + "y": -0.7455868125, + "z": 0.2862096429, + "w": 0.5618448853 } }, "LeftFootTransverse": { "position": { - "x": -0.0673648268, - "y": 0.0343191363, - "z": 0.0456276461 + "x": -0.0673647746, + "y": 0.0343332998, + "z": 0.0456265248 }, "rotation": { - "x": -0.0847754478, - "y": -0.7538978457, - "z": 0.0992590711, - "w": 0.6438937187 + "x": -0.0847704113, + "y": -0.7538981438, + "z": 0.0992542803, + "w": 0.6438949704 } }, "LeftFootBall": { "position": { - "x": -0.0716834217, - "y": 0.0119527942, - "z": 0.0998914465 + "x": -0.0716834441, + "y": 0.01196907, + "z": 0.0998906121 }, "rotation": { - "x": -0.000005692243576, - "y": -0.7840582132, - "z": 0.000003904104233, - "w": 0.6206877828 + "x": -0.000006258487701, + "y": -0.7840589881, + "z": 0.000003822147846, + "w": 0.6206868887 } }, "RightUpperLeg": { "position": { - "x": 0.0604174472, - "y": 0.6875998378, - "z": -0.0077664303 + "x": 0.0604174361, + "y": 0.6875997782, + "z": -0.0077664074 }, "rotation": { - "x": 0.4970662296, - "y": -0.4913885891, + "x": 0.49706617, + "y": -0.4913886189, "z": -0.5090728998, "w": 0.5023019314 } }, "RightLowerLeg": { "position": { - "x": 0.0601603314, - "y": 0.3700747192, - "z": -0.0058686072 + "x": 0.0601603426, + "y": 0.3700733483, + "z": -0.0058685848 }, "rotation": { - "x": 0.4924429655, - "y": -0.4958693385, - "z": -0.5044978261, + "x": 0.4924428463, + "y": -0.4958693981, + "z": -0.5044978857, "w": 0.5070458651 } }, "RightFootAnkleTwist": { "position": { "x": 0.0599026866, - "y": 0.0519308411, - "z": -0.0039670588 + "y": 0.0519291796, + "z": -0.0039670365 }, "rotation": { - "x": 0.4972596765, - "y": -0.5084891319, - "z": -0.5083860159, - "w": 0.4855052829 + "x": 0.5126174092, + "y": -0.4922891259, + "z": -0.5078473091, + "w": 0.4867912531 } }, "RightFootAnkle": { "position": { "x": 0.0599026866, - "y": 0.0519301184, - "z": -0.0039670588 + "y": 0.0519280992, + "z": -0.0039670365 }, "rotation": { "x": -0.6665842533, - "y": 0.0647643209, + "y": 0.0647655129, "z": 0.7403174639, - "w": 0.0583203472 + "w": 0.0583191514 } }, "RightFootSubtalar": { "position": { - "x": 0.0669968054, - "y": 0.0263932236, - "z": 0.0001002032 + "x": 0.0669968277, + "y": 0.0263924152, + "z": 0.0001002771 }, "rotation": { - "x": 0.5618442297, - "y": -0.2862015963, - "z": -0.7455912232, - "w": 0.2156710625 + "x": 0.5618439913, + "y": -0.2862013578, + "z": -0.7455912828, + "w": 0.2156711817 } }, "RightFootTransverse": { "position": { - "x": 0.067364879, - "y": 0.0343471356, - "z": 0.0456256904 + "x": 0.0673647895, + "y": 0.0343465544, + "z": 0.0456256866 }, "rotation": { - "x": 0.643892467, - "y": -0.0992487073, - "z": -0.7539010644, - "w": 0.0847691894 + "x": 0.6438925862, + "y": -0.0992486477, + "z": -0.7539009452, + "w": 0.0847691372 } }, "RightFootBall": { "position": { - "x": 0.0716836229, - "y": 0.0119846715, - "z": 0.0998892337 + "x": 0.0716836154, + "y": 0.0119850757, + "z": 0.0998876318 }, "rotation": { - "x": 0.6206835508, - "y": 0.00000461935997, + "x": 0.6206834912, + "y": 0.000001013278961, "z": -0.7840614319, - "w": 7.338821888e-7 + "w": 0.00000387430191 } } }, @@ -2340,8 +2340,8 @@ "Root": { "position": { "x": 0.0, - "y": 0.0132247061, - "z": -0.0062834192 + "y": 0.013224598, + "z": -0.0062834308 }, "rotation": { "x": -0.0, @@ -2353,8 +2353,8 @@ "Hips": { "position": { "x": 0.0, - "y": 1.1781475544, - "z": -0.0062834192 + "y": 1.1781467199, + "z": -0.0062834308 }, "rotation": { "x": 0.5, @@ -2366,8 +2366,8 @@ "SpineLower": { "position": { "x": 0.0, - "y": 1.2036399841, - "z": -0.0473029725 + "y": 1.2036391497, + "z": -0.0473029837 }, "rotation": { "x": 0.5, @@ -2379,8 +2379,8 @@ "SpineMiddle": { "position": { "x": 0.0, - "y": 1.3428423405, - "z": -0.0333866552 + "y": 1.342841506, + "z": -0.0333866775 }, "rotation": { "x": 0.5, @@ -2392,8 +2392,8 @@ "SpineUpper": { "position": { "x": 0.0, - "y": 1.4807280302, - "z": -0.0661069751 + "y": 1.4807274342, + "z": -0.0661070049 }, "rotation": { "x": 0.5213338733, @@ -2404,1029 +2404,1029 @@ }, "Chest": { "position": { - "x": 3.757345723e-8, - "y": 1.7111055851, + "x": 3.757344302e-8, + "y": 1.7111049891, "z": -0.0328902751 }, "rotation": { - "x": 0.5434916019, - "y": -0.4523459673, - "z": -0.5434916019, - "w": 0.4523459673 + "x": 0.5434915423, + "y": -0.4523460269, + "z": -0.5434915423, + "w": 0.4523460269 } }, "Neck": { "position": { - "x": 0.0, - "y": 1.8319275379, - "z": 0.0811241642 + "x": 3.757344302e-8, + "y": 1.8742556572, + "z": 0.0965866372 }, "rotation": { "x": 0.5792281628, - "y": -0.4055796862, + "y": -0.405579716, "z": -0.5792281628, - "w": 0.4055796862 + "w": 0.405579716 } }, "Head": { "position": { - "x": 0.0, - "y": 1.9033336639, - "z": 0.1344510317 + "x": 3.757344302e-8, + "y": 1.9456626177, + "z": 0.1499137282 }, "rotation": { "x": 0.5978850126, - "y": -0.3775362074, + "y": -0.3775362968, "z": -0.5978850126, - "w": 0.3775362074 + "w": 0.3775362968 } }, "LeftShoulder": { "position": { - "x": -0.0355757624, - "y": 1.7718735933, - "z": 0.0998590812 + "x": -0.0355757587, + "y": 1.7718726397, + "z": 0.0998592302 }, "rotation": { - "x": 0.6626185775, - "y": -0.3457874656, - "z": -0.0511735678, - "w": 0.6623812914 + "x": 0.7295366526, + "y": -0.16250768300000002, + "z": 0.1220059097, + "w": 0.6530559063 } }, "LeftScapula": { "position": { - "x": -0.1640960574, - "y": 1.909432888, - "z": 0.0142857851 + "x": -0.2156564146, + "y": 1.8267430067, + "z": 0.0142858503 }, "rotation": { - "x": 0.7078676224, - "y": -0.030033797, - "z": 0.0239614546, - "w": 0.7052994967 + "x": 0.7078677416, + "y": -0.0300355852, + "z": 0.0239597857, + "w": 0.7052993774 } }, "LeftArmUpper": { "position": { - "x": -0.1812926829, - "y": 1.871647954, - "z": 0.0141839711 + "x": -0.2328532189, + "y": 1.788959384, + "z": 0.0141842514 }, "rotation": { - "x": 0.5279529095, - "y": 0.0080470741, - "z": 0.0365840495, - "w": 0.8484473228 + "x": 0.6091191769, + "y": -0.041027993, + "z": 0.0224258006, + "w": 0.7916992903 } }, "LeftArmLower": { "position": { - "x": -0.4938182533, - "y": 1.8495196104, - "z": 0.0071677282 + "x": -0.5449413061, + "y": 1.7933226824, + "z": -0.0139457071 }, "rotation": { - "x": 0.5117795467, - "y": -0.0181775093, - "z": 0.056309104, - "w": 0.8570771217 + "x": 0.5923502445, + "y": -0.0687448084, + "z": 0.0385825336, + "w": 0.8018147945 } }, "LeftHandWristTwist": { "position": { - "x": -0.7752217054, - "y": 1.827354908, - "z": -0.0178622808 + "x": -0.8248192668, + "y": 1.7987610102, + "z": -0.0580256693 }, "rotation": { - "x": 0.5410473347, - "y": 0.0233787298, - "z": 0.0940625072, - "w": 0.8353884816 + "x": 0.6196129322, + "y": -0.0316429436, + "z": 0.0819692314, + "w": 0.7799743414 } }, "RightShoulder": { "position": { - "x": 0.0355758145, - "y": 1.7718729973, - "z": 0.099859193 + "x": 0.0355758592, + "y": 1.7718726397, + "z": 0.0998592302 }, "rotation": { - "x": -0.6623902321, - "y": -0.0511401072, - "z": 0.3458030224, - "w": 0.6626041532 + "x": -0.6530561447, + "y": 0.1220409498, + "z": 0.1625260413, + "w": 0.7295266986 } }, "RightScapula": { "position": { - "x": 0.1640888602, - "y": 1.9094340801, - "z": 0.0142702954 + "x": 0.2156509757, + "y": 1.8267486095, + "z": 0.014270558 }, "rotation": { - "x": -0.7053014636, - "y": 0.0239846446, - "z": 0.0300642587, + "x": -0.7053016424, + "y": 0.0239856318, + "z": 0.0300640538, "w": 0.7078634501 } }, "RightArmUpper": { "position": { - "x": 0.1812853068, - "y": 1.8716404438, - "z": 0.014166818 + "x": 0.2328477353, + "y": 1.7889553308, + "z": 0.0141674001 }, "rotation": { - "x": -0.7477719188, - "y": 0.0397687778, - "z": -0.0177108999, - "w": 0.6625270844 + "x": -0.7917090654, + "y": 0.0222432576, + "z": 0.0408270285, + "w": 0.6091266870000001 } }, "RightArmLower": { "position": { - "x": 0.493476212, - "y": 1.8453691006, - "z": 0.0067211678 + "x": 0.5449490547, + "y": 1.7933347225, + "z": -0.0137869976 }, "rotation": { - "x": -0.7590822577, - "y": 0.0554310828, - "z": 0.011912182, - "w": 0.6485211849 + "x": -0.8018188477, + "y": 0.0387373418, + "z": 0.0689332932, + "w": 0.5923125744 } }, "RightHandWristTwist": { "position": { - "x": 0.7750377655, - "y": 1.8257803917, - "z": -0.0186849143 + "x": 0.8248065114, + "y": 1.7987654209, + "z": -0.058008384 }, "rotation": { - "x": -0.7820994854, - "y": 0.1004974991, - "z": -0.0150331091, - "w": 0.6148127317 + "x": -0.8257985115, + "y": 0.0794116929, + "z": 0.0381122306, + "w": 0.5570442677 } }, "LeftHandPalm": { "position": { - "x": -0.7425467968, - "y": 1.8391879797, - "z": -0.0324079432 + "x": -0.8333162665, + "y": 1.8140623569, + "z": 0.0235670172 }, "rotation": { - "x": 0.971493125, - "y": 0.031370759, - "z": 0.0207170248, - "w": 0.2340689898 + "x": 0.989654243, + "y": -0.0131030977, + "z": 0.0417384803, + "w": 0.136643827 } }, "LeftHandWrist": { "position": { - "x": -0.8565595746, - "y": 1.7976946831, - "z": -0.0400505327 + "x": -0.8565607071, + "y": 1.7976956367, + "z": -0.0400506854 }, "rotation": { - "x": 0.9710917473, - "y": 0.033731252, - "z": -0.0267710686, - "w": 0.2347907275 + "x": 0.99071455, + "y": -0.0064450204, + "z": -0.0019370317, + "w": 0.1357936412 } }, "LeftHandThumbMetacarpal": { "position": { - "x": -0.8985606432, - "y": 1.7900358438, - "z": 0.0053865206 + "x": -0.9019880891, + "y": 1.7845437527, + "z": 0.000577104 }, "rotation": { - "x": -0.7990608215, - "y": 0.0874715745, - "z": 0.4044393897, - "w": 0.4362105727 + "x": -0.7594960928, + "y": 0.0620353445, + "z": 0.3702404499, + "w": 0.5312625766 } }, "LeftHandThumbProximal": { "position": { - "x": -0.9255143404, - "y": 1.7813025713, - "z": 0.0350086838 + "x": -0.9314264059, + "y": 1.7722818851, + "z": 0.0263321977 }, "rotation": { - "x": -0.8509477377, - "y": 0.1538920701, - "z": 0.3828178346, - "w": 0.3250478208 + "x": -0.8191450834, + "y": 0.1355279833, + "z": 0.3578902483, + "w": 0.4272574782 } }, "LeftHandThumbDistal": { "position": { - "x": -0.9536119103, - "y": 1.7818590403, - "z": 0.0670294613 + "x": -0.9615513086, + "y": 1.7687115669, + "z": 0.0562468208 }, "rotation": { - "x": -0.7837151289, - "y": 0.2131866217, - "z": 0.4414275289, - "w": 0.3814239502 + "x": -0.7463007569, + "y": 0.1843777746, + "z": 0.4221044779, + "w": 0.4804881215 } }, "LeftHandThumbTip": { "position": { - "x": -0.9633494616, - "y": 1.7818096876, - "z": 0.0830434933 + "x": -0.9723393917, + "y": 1.7662656307, + "z": 0.0713729858 }, "rotation": { - "x": -0.7837161422, - "y": 0.2131845653, - "z": 0.4414271414, - "w": 0.3814237416 + "x": -0.7463008165, + "y": 0.1843776405, + "z": 0.4221040606, + "w": 0.4804880619 } }, "LeftHandIndexMetacarpal": { "position": { - "x": -0.8565595746, - "y": 1.7976946831, - "z": -0.0400505327 + "x": -0.8565607071, + "y": 1.7976956367, + "z": -0.0400506854 }, "rotation": { - "x": 0.971091032, - "y": 0.0337311924, - "z": -0.0267709494, - "w": 0.2347932905 + "x": 0.9907143712, + "y": -0.0064452589, + "z": -0.0019362867, + "w": 0.1357938945 } }, "LeftHandIndexProximal": { "position": { - "x": -0.9753466845, - "y": 1.7966929674, - "z": -0.0012752531 + "x": -0.9775231481, + "y": 1.7984092236, + "z": -0.0087189414 }, "rotation": { - "x": 0.9757078886, - "y": 0.0763344467, - "z": -0.0274331868, - "w": 0.2035066187 + "x": 0.9937332273, + "y": 0.0367527008, + "z": 0.0029704273, + "w": 0.1055232137 } }, "LeftHandIndexIntermediate": { "position": { - "x": -1.0225353241, - "y": 1.7901037931, - "z": 0.0027701308 + "x": -1.0252099037, + "y": 1.7948857546, + "z": -0.0086305691 }, "rotation": { - "x": 0.9700353146, - "y": 0.0816780031, - "z": -0.0191768706, - "w": 0.2280201316 + "x": 0.9905004501, + "y": 0.0406869352, + "z": 0.0106443465, + "w": 0.1309221536 } }, "LeftHandIndexDistal": { "position": { - "x": -1.0527420044, - "y": 1.7855169773, - "z": 0.005051591 + "x": -1.0557436943, + "y": 1.7923306227, + "z": -0.0089512207 }, "rotation": { - "x": 0.9697737694, - "y": 0.0180484653, - "z": 0.0249560475, - "w": 0.2420553267 + "x": 0.9879727364, + "y": -0.027405262, + "z": 0.0475876182, + "w": 0.1445500702 } }, "LeftHandIndexTip": { "position": { - "x": -1.0673193932, - "y": 1.7848286629, - "z": 0.0044729598 + "x": -1.0702598095, + "y": 1.7929214239, + "z": -0.0104394285 }, "rotation": { - "x": 0.9697729945, - "y": 0.0180479288, - "z": 0.0249559879, - "w": 0.2420579791 + "x": 0.9879726768, + "y": -0.0274050832, + "z": 0.04758811, + "w": 0.1445503235 } }, "LeftHandMiddleMetacarpal": { "position": { - "x": -0.8565595746, - "y": 1.7976946831, - "z": -0.0400505327 + "x": -0.8565607071, + "y": 1.7976956367, + "z": -0.0400506854 }, "rotation": { - "x": 0.971091032, - "y": 0.0337311924, - "z": -0.0267709494, - "w": 0.2347932905 + "x": 0.9907143712, + "y": -0.0064452589, + "z": -0.0019362867, + "w": 0.1357938945 } }, "LeftHandMiddleProximal": { "position": { - "x": -0.9763676524, - "y": 1.7894605398, - "z": -0.0284810662 + "x": -0.9771614075, + "y": 1.7967962027, + "z": -0.0368404835 }, "rotation": { - "x": 0.9661111832, - "y": 0.0810450017, - "z": -0.0272717178, - "w": 0.2435519248 + "x": 0.9883875251, + "y": 0.0405382812, + "z": 0.0018490851, + "w": 0.1464373469 } }, "LeftHandMiddleIntermediate": { "position": { - "x": -1.0296998024, - "y": 1.7817008495, - "z": -0.0234928131 + "x": -1.0311050415, + "y": 1.7924296856, + "z": -0.0363959149 }, "rotation": { - "x": 0.9635846615, - "y": 0.0805024803, - "z": -0.021646589, - "w": 0.2540774345 + "x": 0.9867421389, + "y": 0.0392006934, + "z": 0.0069224238, + "w": 0.1573415548 } }, "LeftHandMiddleDistal": { "position": { - "x": -1.0639513731, - "y": 1.776696682, - "z": -0.0206236299 + "x": -1.0657275915, + "y": 1.7896672487, + "z": -0.0364422798 }, "rotation": { - "x": 0.9576931, - "y": -0.0076005161, - "z": 0.0092990696, - "w": 0.2875414193 + "x": 0.9800848961, + "y": -0.0522781163, + "z": 0.0274181962, + "w": 0.1896028668 } }, "LeftHandMiddleTip": { "position": { - "x": -1.0793333054, - "y": 1.7768371105, - "z": -0.0209639687 + "x": -1.0810061693, + "y": 1.7910827398, + "z": -0.0375735424 }, "rotation": { - "x": 0.9576940536, - "y": -0.0075998306, - "z": 0.0092987418, - "w": 0.2875385284 + "x": 0.9800847769, + "y": -0.0522776395, + "z": 0.0274179578, + "w": 0.1896041483 } }, "LeftHandRingMetacarpal": { "position": { - "x": -0.8565595746, - "y": 1.7976946831, - "z": -0.0400505327 + "x": -0.8565607071, + "y": 1.7976956367, + "z": -0.0400506854 }, "rotation": { - "x": 0.971091032, - "y": 0.0337311924, - "z": -0.0267709494, - "w": 0.2347932905 + "x": 0.9907143712, + "y": -0.0064452589, + "z": -0.0019362867, + "w": 0.1357938945 } }, "LeftHandRingProximal": { "position": { - "x": -0.9681169391, - "y": 1.7743865252, - "z": -0.0482861102 + "x": -0.9685954452, + "y": 1.7853299379, + "z": -0.0588100515 }, "rotation": { - "x": 0.9535794258, - "y": 0.0788697898, - "z": -0.0260134637, - "w": 0.2894642055 + "x": 0.9804308414, + "y": 0.0372952223, + "z": 0.0008201897, + "w": 0.1932985634 } }, "LeftHandRingIntermediate": { "position": { - "x": -1.0166045427, - "y": 1.7677328587, - "z": -0.0436019786 + "x": -1.017621994, + "y": 1.7817183733, + "z": -0.0581797212 }, "rotation": { - "x": 0.9429101944, - "y": 0.0859186351, - "z": -0.0223284662, - "w": 0.3209983408 + "x": 0.9731413126, + "y": 0.0433514714, + "z": 0.003713429, + "w": 0.2260608822 } }, "LeftHandRingDistal": { "position": { - "x": -1.0495792627, - "y": 1.7627824545, - "z": -0.0403429307 + "x": -1.0509978533, + "y": 1.7788358927, + "z": -0.0577652827 }, "rotation": { - "x": 0.9425901175, - "y": 0.0529655814, - "z": -0.0414924026, - "w": 0.3271046877 + "x": 0.9728227854, + "y": 0.0123532712, + "z": -0.0188778937, + "w": 0.2304501235 } }, "LeftHandRingTip": { "position": { - "x": -1.0644946098, - "y": 1.7616884708, - "z": -0.0386444591 + "x": -1.0660349131, + "y": 1.7786053419, + "z": -0.057126537 }, "rotation": { - "x": 0.9425897598, - "y": 0.0529650152, - "z": -0.0414928198, - "w": 0.327105999 + "x": 0.9728229046, + "y": 0.0123529732, + "z": -0.0188778937, + "w": 0.2304503769 } }, "LeftHandLittleMetacarpal": { "position": { - "x": -0.8994793892, - "y": 1.7716044188, - "z": -0.0574994981 + "x": -0.8998224735, + "y": 1.7790279388, + "z": -0.0646912009 }, "rotation": { - "x": 0.8945846558, - "y": 0.0889301598, - "z": 0.1130545437, - "w": 0.4231179655 + "x": 0.931327343, + "y": 0.0313606858, + "z": 0.1333446503, + "w": 0.3374396861 } }, "LeftHandLittleProximal": { "position": { - "x": -0.9546507597, - "y": 1.7569402456, - "z": -0.0648072362 + "x": -0.9552170038, + "y": 1.770486474, + "z": -0.0777654052 }, "rotation": { - "x": 0.9302955866, - "y": 0.0867961943, - "z": -0.0222896338, - "w": 0.3556972146 + "x": 0.9641227126, + "y": 0.0436118245, + "z": 0.002184093, + "w": 0.2618415356 } }, "LeftHandLittleIntermediate": { "position": { - "x": -0.9927622676, - "y": 1.7513024807, - "z": -0.0608091913 + "x": -0.9938004613, + "y": 1.7671854496, + "z": -0.0770441443 }, "rotation": { - "x": 0.9174255729, - "y": 0.0903981328, - "z": 0.0256860852, - "w": 0.3866512775 + "x": 0.9531008601, + "y": 0.0418874025, + "z": 0.0486977696, + "w": 0.2957584858 } }, "LeftHandLittleDistal": { "position": { - "x": -1.0179184675, - "y": 1.7465451956, - "z": -0.060225904 + "x": -1.0191967487, + "y": 1.7644034624, + "z": -0.0787868723 }, "rotation": { - "x": 0.9197365642, - "y": 0.0492330194, - "z": -0.0102359056, - "w": 0.3893024921 + "x": 0.9552643299, + "y": 0.0044210553, + "z": 0.0088352263, + "w": 0.2955884337 } }, "LeftHandLittleTip": { "position": { - "x": -1.0328540802, - "y": 1.745303154, - "z": -0.0593676493 + "x": -1.0342078209, + "y": 1.7641993761, + "z": -0.0790008232 }, "rotation": { - "x": 0.9197366238, - "y": 0.0492328107, - "z": -0.0102358162, - "w": 0.3893023729 + "x": 0.9552643299, + "y": 0.0044212341, + "z": 0.0088351369, + "w": 0.2955887914 } }, "RightHandPalm": { "position": { - "x": 0.742993176, - "y": 1.8385834694, - "z": -0.0239390358 + "x": 0.8321536183, + "y": 1.8183000088, + "z": 0.0152200013 }, "rotation": { - "x": -0.0679005831, - "y": 0.016706869, - "z": -0.0403743684, - "w": 0.996735096 + "x": -0.1366476268, + "y": 0.0419849455, + "z": 0.0131212771, + "w": 0.9896429181 } }, "RightHandWrist": { "position": { - "x": 0.8565598726, - "y": 1.797695756, - "z": -0.0400503092 + "x": 0.8565619588, + "y": 1.7976974249, + "z": -0.0400504582 }, "rotation": { - "x": -0.0691484809, - "y": -0.0297718197, - "z": -0.0506472141, - "w": 0.9958751202 + "x": -0.1358065903, + "y": -0.0017631948, + "z": 0.0064599216, + "w": 0.9907131195 } }, "RightHandThumbMetacarpal": { "position": { - "x": 0.897200644, - "y": 1.7744827271, - "z": 0.0011450036 + "x": 0.9020054936, + "y": 1.7845473289, + "z": 0.0005626758 }, "rotation": { - "x": 0.5582319498, - "y": -0.4273124039, - "z": 0.0154792964, - "w": 0.7110149264 + "x": 0.5312583447, + "y": -0.3701130152, + "z": 0.0619403869, + "w": 0.7595688105 } }, "RightHandThumbProximal": { "position": { - "x": 0.9232000113, - "y": 1.7558283806, - "z": 0.0267631877 + "x": 0.9314520955, + "y": 1.7722854614, + "z": 0.0263077747 }, "rotation": { - "x": 0.4567514956, - "y": -0.4165429473, - "z": 0.0827176422, - "w": 0.7816829681 + "x": 0.4272656739, + "y": -0.357747972, + "z": 0.1354542375, + "w": 0.8192149401 } }, "RightHandThumbDistal": { "position": { - "x": 0.9504380226, - "y": 1.7451262474, - "z": 0.0577273257 + "x": 0.9615890384, + "y": 1.7687169313, + "z": 0.0562121756 }, "rotation": { - "x": 0.4997877777, - "y": -0.4840210676, - "z": 0.1327479929, - "w": 0.7059139013 + "x": 0.4805044532, + "y": -0.4219776392, + "z": 0.1842945069, + "w": 0.7463823557 } }, "RightHandThumbTip": { "position": { - "x": 0.9597381949, - "y": 1.7395710945, - "z": 0.0730191916 + "x": 0.9723795056, + "y": 1.7662724257, + "z": 0.0713363141 }, "rotation": { - "x": 0.4840207696, - "y": 0.4997853637, - "z": -0.7059158683, - "w": 0.1327471137 + "x": 0.4219782054, + "y": 0.4805023074, + "z": -0.746383965, + "w": 0.1842922866 } }, "RightHandIndexMetacarpal": { "position": { - "x": 0.8565598726, - "y": 1.797695756, - "z": -0.0400503092 + "x": 0.8565619588, + "y": 1.7976974249, + "z": -0.0400504582 }, "rotation": { - "x": -0.0691481531, - "y": -0.0297696143, - "z": -0.0506473333, - "w": 0.9958752394 + "x": -0.1358056217, + "y": -0.0017631948, + "z": 0.0064596832, + "w": 0.9907131791 } }, "RightHandIndexProximal": { "position": { - "x": 0.9742334485, - "y": 1.7810744047, - "z": -0.0014285528 + "x": 0.9775383472, + "y": 1.7984104156, + "z": -0.0087604979 }, "rotation": { - "x": -0.037037909, - "y": -0.0236817598, - "z": -0.0924376249, - "w": 0.9947477579 + "x": -0.1055439413, + "y": 0.0031518042, + "z": -0.0367461741, + "w": 0.9937308431 } }, "RightHandIndexIntermediate": { "position": { - "x": 1.0211788416, - "y": 1.7723656893, - "z": 0.0011522176 + "x": 1.025225997, + "y": 1.7948875427, + "z": -0.0086894091 }, "rotation": { - "x": -0.0620065629, - "y": -0.0143264234, - "z": -0.0965544879, - "w": 0.9932913184 + "x": -0.1309434772, + "y": 0.0108245164, + "z": -0.0406749696, + "w": 0.9904963374 } }, "RightHandIndexDistal": { "position": { - "x": 1.0512384176, - "y": 1.7665425539, - "z": 0.0023904133 + "x": 1.0557578802, + "y": 1.7923316956, + "z": -0.0090191532 }, "rotation": { - "x": -0.0761717707, - "y": 0.0187023431, - "z": -0.0266193449, - "w": 0.9965640306 + "x": -0.14455688, + "y": 0.0477681905, + "z": 0.0274179727, + "w": 0.9879627228 } }, "RightHandIndexTip": { "position": { - "x": 1.0658080578, - "y": 1.7657243013, - "z": 0.0019045885 + "x": 1.0702716112, + "y": 1.7929207087, + "z": -0.0105136745 }, "rotation": { - "x": -0.0761713088, - "y": 0.0187030733, - "z": -0.026619643, - "w": 0.9965640306 + "x": -0.1445578188, + "y": 0.0477688164, + "z": 0.0274181217, + "w": 0.9879624844 } }, "RightHandMiddleMetacarpal": { "position": { - "x": 0.8565598726, - "y": 1.797695756, - "z": -0.0400503092 + "x": 0.8565619588, + "y": 1.7976974249, + "z": -0.0400504582 }, "rotation": { - "x": -0.0691481531, - "y": -0.0297696143, - "z": -0.0506473333, - "w": 0.9958752394 + "x": -0.1358056217, + "y": -0.0017631948, + "z": 0.0064596832, + "w": 0.9907131791 } }, "RightHandMiddleProximal": { "position": { - "x": 0.9758659601, - "y": 1.7831752300000002, - "z": -0.0294721778 + "x": 0.9771680236, + "y": 1.7967964411, + "z": -0.0368824154 }, "rotation": { - "x": -0.0780552626, - "y": -0.0222030282, - "z": -0.0974286795, - "w": 0.9919286966 + "x": -0.146454975, + "y": 0.0020294785, + "z": -0.0405240655, + "w": 0.9883851409 } }, "RightHandMiddleIntermediate": { "position": { - "x": 1.0289064646, - "y": 1.7729010582, - "z": -0.0262665618 + "x": 1.0311096907, + "y": 1.7924290895, + "z": -0.0364564098 }, "rotation": { - "x": -0.0888071358, - "y": -0.0166094005, - "z": -0.0960497558, - "w": 0.9912679195 + "x": -0.1573592126, + "y": 0.007102102, + "z": -0.0391848385, + "w": 0.986738205 } }, "RightHandMiddleDistal": { "position": { - "x": 1.0629791021, - "y": 1.7663916349, - "z": -0.0245299153 + "x": 1.065731287, + "y": 1.7896661758, + "z": -0.0365152471 }, "rotation": { - "x": -0.1234899461, - "y": -0.0004005879, - "z": -0.004359588, - "w": 0.9923363328 + "x": -0.1896053106, + "y": 0.0275974423, + "z": 0.0523016602, + "w": 0.98007828 } }, "RightHandMiddleTip": { "position": { - "x": 1.078363657, - "y": 1.7662584782, - "z": -0.0245015863 + "x": 1.0810101032, + "y": 1.7910827398, + "z": -0.0376517698 }, "rotation": { - "x": -0.123489216, - "y": -0.0004010201, - "z": -0.0043596625, - "w": 0.9923363328 + "x": -0.1896055788, + "y": 0.0275975913, + "z": 0.05230169, + "w": 0.9800782204 } }, "RightHandRingMetacarpal": { "position": { - "x": 0.8565598726, - "y": 1.797695756, - "z": -0.0400503092 + "x": 0.8565619588, + "y": 1.7976974249, + "z": -0.0400504582 }, "rotation": { - "x": -0.0691481531, - "y": -0.0297696143, - "z": -0.0506473333, - "w": 0.9958752394 + "x": -0.1358056217, + "y": -0.0017631948, + "z": 0.0064596832, + "w": 0.9907131791 } }, "RightHandRingProximal": { "position": { - "x": 0.9678990245, - "y": 1.7756654024, - "z": -0.0532990098 + "x": 0.9685906172, + "y": 1.7853294611, + "z": -0.0588479266 }, "rotation": { - "x": -0.125428319, - "y": -0.0206978321, - "z": -0.0954834819, - "w": 0.9872804284 + "x": -0.1933214515, + "y": 0.0010000318, + "z": -0.0372716933, + "w": 0.9804270864 } }, "RightHandRingIntermediate": { "position": { - "x": 1.0161237717, - "y": 1.766651988, - "z": -0.0501128547 + "x": 1.0176202059, + "y": 1.781717658, + "z": -0.0582359284 }, "rotation": { - "x": -0.1581761539, - "y": -0.0154310763, - "z": -0.1020769775, - "w": 0.9819993973 + "x": -0.2260831147, + "y": 0.0038911253, + "z": -0.0433208793, + "w": 0.9731367826 } }, "RightHandRingDistal": { "position": { - "x": 1.0489125252, - "y": 1.7600979805, - "z": -0.0480149798 + "x": 1.0509946346, + "y": 1.7788344622, + "z": -0.0578326918 }, "rotation": { - "x": -0.1648376137, - "y": -0.0397613347, - "z": -0.0728590786, - "w": 0.982822299 + "x": -0.230465591, + "y": -0.0187003016, + "z": -0.0123208165, + "w": 0.9728230834 } }, "RightHandRingTip": { "position": { - "x": 1.0637581348, - "y": 1.7581397295, - "z": -0.046477925 + "x": 1.066033721, + "y": 1.7786051035, + "z": -0.057199955 }, "rotation": { - "x": -0.1648371071, - "y": -0.0397612602, - "z": -0.0728590041, - "w": 0.9828224182 + "x": -0.230465591, + "y": -0.0187003016, + "z": -0.0123208165, + "w": 0.9728230834 } }, "RightHandLittleMetacarpal": { "position": { - "x": 0.8994932175, - "y": 1.777756691, - "z": -0.0642719641 + "x": 0.8998140693, + "y": 1.7790299654, + "z": -0.0647057742 }, "rotation": { - "x": -0.2654671073, - "y": 0.1201665848, - "z": -0.0831334889, - "w": 0.9529826641 + "x": -0.3374564052, + "y": 0.1335095763, + "z": -0.0313133448, + "w": 0.9312993884 } }, "RightHandLittleProximal": { "position": { - "x": 0.9545876384, - "y": 1.7649626732, - "z": -0.0749099851 + "x": 0.9552053213, + "y": 1.770488143, + "z": -0.0777989924 }, "rotation": { - "x": -0.1944755912, - "y": -0.0147392601, - "z": -0.1032120436, - "w": 0.9753509164 + "x": -0.2618632913, + "y": 0.002358377, + "z": -0.0435749888, + "w": 0.9641180634 } }, "RightHandLittleIntermediate": { "position": { - "x": 0.9924775958, - "y": 1.7573879957, - "z": -0.0722423419 + "x": 0.9937873483, + "y": 1.7671866417, + "z": -0.0770903602 }, "rotation": { - "x": -0.226595372, - "y": 0.0336343944, - "z": -0.0989831984, - "w": 0.9683624506 + "x": -0.2957775593, + "y": 0.0488716811, + "z": -0.0418473035, + "w": 0.9530879259 } }, "RightHandLittleDistal": { "position": { - "x": 1.0175266266, - "y": 1.7520917654, - "z": -0.0727609321 + "x": 1.0191835165, + "y": 1.7644033432, + "z": -0.0788421109 }, "rotation": { - "x": -0.2296904773, - "y": -0.0086548626, - "z": -0.0644540489, - "w": 0.9710886478 + "x": -0.2956032753, + "y": 0.0090100616, + "z": -0.0043804199, + "w": 0.9552585483 } }, "RightHandLittleTip": { "position": { - "x": 1.0324133635, - "y": 1.7502714396, - "z": -0.0720636472 + "x": 1.0341959, + "y": 1.7641965151, + "z": -0.079061918 }, "rotation": { - "x": -0.2296901494, - "y": -0.0086558312, - "z": -0.0644541234, - "w": 0.9710888267 + "x": -0.2956036627, + "y": 0.0090104789, + "z": -0.0043801814, + "w": 0.9552583098 } }, "LeftUpperLeg": { "position": { - "x": -0.1006957293, - "y": 1.1459997892, - "z": -0.0129439905 + "x": -0.100695692, + "y": 1.1459988356, + "z": -0.0129439998 }, "rotation": { "x": -0.5023019314, "y": -0.509073019, - "z": 0.4913885593, - "w": 0.4970662594 + "z": 0.4913884401, + "w": 0.4970663786 } }, "LeftLowerLeg": { "position": { - "x": -0.1002671197, - "y": 0.6167656183, - "z": -0.0097813206 + "x": -0.1002670825, + "y": 0.6167820692, + "z": -0.0097814435 }, "rotation": { - "x": -0.5070456862, - "y": -0.5044981837, - "z": 0.4958690107, - "w": 0.4924434125 + "x": -0.5070456266, + "y": -0.5044982433, + "z": 0.4958689213, + "w": 0.4924434423 } }, "LeftFootAnkleTwist": { "position": { - "x": -0.0998378322, - "y": 0.0865127146, - "z": -0.0066124876 + "x": -0.0998377502, + "y": 0.086534366, + "z": -0.0066126497 }, "rotation": { - "x": -0.4981116354, - "y": -0.4940590262, - "z": 0.5250948071, - "w": 0.4817323983 + "x": -0.4947124124, + "y": -0.4992416203, + "z": 0.5031920075, + "w": 0.5028077364 } }, "LeftFootAnkle": { "position": { - "x": -0.0998378322, - "y": 0.0865114406, - "z": -0.0066124876 + "x": -0.0998377502, + "y": 0.08653339, + "z": -0.0066126497 }, "rotation": { - "x": 0.0583182573, - "y": -0.7403145432, - "z": 0.0647699833, - "w": 0.6665875316 + "x": 0.0583190918, + "y": -0.7403146029, + "z": 0.0647687912, + "w": 0.666587472 } }, "LeftFootSubtalar": { "position": { - "x": -0.111661166, - "y": 0.0439456664, - "z": 0.0001668256 + "x": -0.1116609648, + "y": 0.0439762063, + "z": 0.0001665766 }, "rotation": { - "x": -0.2156764567, - "y": -0.7455860376, - "z": 0.2862127125, - "w": 0.5618436337 + "x": -0.2156722546, + "y": -0.745587647, + "z": 0.28620857, + "w": 0.5618451834 } }, "LeftFootTransverse": { "position": { - "x": -0.1122746766, - "y": 0.0571999289, - "z": 0.0760479569 + "x": -0.1122743711, + "y": 0.0572336949, + "z": 0.0760423765 }, "rotation": { - "x": -0.0847738087, - "y": -0.7538980246, - "z": 0.0992578417, - "w": 0.6438942552 + "x": -0.0847713649, + "y": -0.753898263, + "z": 0.0992552936, + "w": 0.6438943148 } }, "LeftFootBall": { "position": { - "x": -0.1194726378, - "y": 0.0199221, - "z": 0.1664912701 + "x": -0.1194721609, + "y": 0.019960314, + "z": 0.1664798111 }, "rotation": { - "x": -0.000002861022949, - "y": -0.7840585709, - "z": 5.960464478e-7, - "w": 0.620687604 + "x": -0.00000387430191, + "y": -0.7840589881, + "z": 0.000001683831215, + "w": 0.6206869483 } }, "RightUpperLeg": { "position": { - "x": 0.100695692, - "y": 1.1459991932, - "z": -0.0129439905 + "x": 0.1006956622, + "y": 1.1459988356, + "z": -0.0129439998 }, "rotation": { - "x": 0.4970661402, + "x": 0.4970661998, "y": -0.4913886786, - "z": -0.5090728998, - "w": 0.5023020506 + "z": -0.5090728402, + "w": 0.5023019314 } }, "RightLowerLeg": { "position": { - "x": 0.1002671942, - "y": 0.6167907119, - "z": -0.0097809071 + "x": 0.1002670825, + "y": 0.6167881489, + "z": -0.0097809173 }, "rotation": { - "x": 0.4924430251, - "y": -0.4958693385, - "z": -0.5044979453, - "w": 0.5070459247 + "x": 0.4924428463, + "y": -0.4958693981, + "z": -0.5044978857, + "w": 0.5070458651 } }, "RightFootAnkleTwist": { "position": { - "x": 0.0998378322, - "y": 0.0865514949, - "z": -0.0066116611 + "x": 0.0998376086, + "y": 0.0865467638, + "z": -0.0066117477 }, "rotation": { - "x": 0.4999377728, - "y": -0.5035692453, - "z": -0.5320985317, - "w": 0.461900115 + "x": 0.505556345, + "y": -0.4986870587, + "z": -0.5222492218, + "w": 0.4722075164 } }, "RightFootAnkle": { "position": { - "x": 0.0998378322, - "y": 0.0865501389, - "z": -0.0066116611 + "x": 0.0998376161, + "y": 0.0865450352, + "z": -0.0066117477 }, "rotation": { - "x": -0.6665844917, - "y": 0.0647648573, - "z": 0.7403175235, - "w": 0.05831974 + "x": -0.6665842533, + "y": 0.0647635758, + "z": 0.7403173447, + "w": 0.0583212003 } }, "RightFootSubtalar": { "position": { - "x": 0.1116613522, - "y": 0.0439875983, - "z": 0.0001671168 + "x": 0.1116612405, + "y": 0.0439868011, + "z": 0.0001670932 }, "rotation": { - "x": 0.5618445873, - "y": -0.2862012386, - "z": -0.7455913424, - "w": 0.2156707048 + "x": 0.5618444085, + "y": -0.2862009406, + "z": -0.7455910444, + "w": 0.2156707346 } }, "RightFootTransverse": { "position": { - "x": 0.1122745797, - "y": 0.0572465956, - "z": 0.076042451 + "x": 0.1122744828, + "y": 0.0572453439, + "z": 0.0760418251 }, "rotation": { - "x": 0.643892169, - "y": -0.0992503464, - "z": -0.7539008856, - "w": 0.0847707093 + "x": 0.6438924074, + "y": -0.0992481112, + "z": -0.7539010048, + "w": 0.0847685933 } }, "RightFootBall": { "position": { - "x": 0.1194727793, - "y": 0.0199731998, - "z": 0.1664827913 + "x": 0.119472377, + "y": 0.0199723374, + "z": 0.1664772779 }, "rotation": { - "x": 0.6206835508, - "y": 0.000006198883057, - "z": -0.7840614915, - "w": 4.172325134e-7 + "x": 0.6206836104, + "y": 0.000003933906555, + "z": -0.7840612531, + "w": 0.000001005828381 } } }, @@ -3503,10 +3503,10 @@ "z": -0.0211039186 }, "rotation": { - "x": 0.5434915423, - "y": -0.4523460567, - "z": -0.5434915423, - "w": 0.4523460567 + "x": 0.5434916019, + "y": -0.4523461163, + "z": -0.5434916019, + "w": 0.4523461163 } }, "Neck": { @@ -3542,62 +3542,62 @@ "z": 0.0841895342 }, "rotation": { - "x": 0.735568583, - "y": -0.1307590455, - "z": 0.0912583321, + "x": 0.7355686426, + "y": -0.1307590157, + "z": 0.0912583023, "w": 0.6584172249 } }, "LeftScapula": { "position": { - "x": -0.1819401085, + "x": -0.1819401979, "y": 1.4377095699, - "z": 0.0290723294 + "z": 0.0290723443 }, "rotation": { - "x": 0.7091403604, - "y": 0.0039570928, - "z": -0.0053887963, - "w": 0.7050358653 + "x": 0.70914042, + "y": 0.0039570332, + "z": -0.0053888559, + "w": 0.7050359249 } }, "LeftArmUpper": { "position": { - "x": -0.1957475245, + "x": -0.1957476139, "y": 1.4076577425, "z": 0.0301009864 }, "rotation": { - "x": 0.610424161, - "y": 0.015484035, - "z": 0.0136752129, - "w": 0.7918055654 + "x": 0.6104242802, + "y": 0.0154840946, + "z": 0.0136752725, + "w": 0.7918056846 } }, "LeftArmLower": { "position": { - "x": -0.452329427, + "x": -0.4523295462, "y": 1.3972420692, - "z": 0.0321103632 + "z": 0.0321103334 }, "rotation": { "x": 0.5934274197, - "y": 0.0193641782, - "z": -0.0229664445, + "y": 0.019364208, + "z": -0.0229664743, "w": 0.8043271303 } }, "LeftHandWristTwist": { "position": { - "x": -0.684171617, - "y": 1.400485158, + "x": -0.6841717362, + "y": 1.4004850388, "z": 0.0456761718 }, "rotation": { "x": 0.6250795126, - "y": 0.0539761186, - "z": 0.0171906352, - "w": 0.7785032392 + "y": 0.0539762676, + "z": 0.0171907246, + "w": 0.7785032988 } }, "RightShoulder": { @@ -3607,374 +3607,374 @@ "z": 0.0841895342 }, "rotation": { - "x": -0.6584200263, - "y": 0.091263555, - "z": 0.1307555735, - "w": 0.7355657816 + "x": -0.6584202051, + "y": 0.0912635624, + "z": 0.1307556331, + "w": 0.7355659604 } }, "RightScapula": { "position": { - "x": 0.1819396913, + "x": 0.1819398105, "y": 1.4377150536, - "z": 0.0290723145 + "z": 0.0290722847 }, "rotation": { - "x": -0.7050362825000001, - "y": -0.0053918203, - "z": -0.0039527854, - "w": 0.7091399431 + "x": -0.7050364017, + "y": -0.0053919116, + "z": -0.0039527575, + "w": 0.7091400623 } }, "RightArmUpper": { "position": { - "x": 0.1957473755, - "y": 1.4076554775, - "z": 0.0301005244 + "x": 0.1957474947, + "y": 1.4076555967, + "z": 0.0301005095 }, "rotation": { - "x": -0.7918003798, - "y": 0.0136749484, - "z": -0.0154844187, - "w": 0.6104307771 + "x": -0.791800499, + "y": 0.0136749819, + "z": -0.0154843256, + "w": 0.6104308367 } }, "RightArmLower": { "position": { - "x": 0.4523250163, - "y": 1.3972401619, + "x": 0.4523252249, + "y": 1.3972404003, "z": 0.032110393 }, "rotation": { - "x": -0.8043328524, - "y": -0.0229665115, - "z": -0.0193649605, - "w": 0.593419373 + "x": -0.804332912, + "y": -0.0229665525, + "z": -0.0193649419, + "w": 0.5934194326 } }, "RightHandWristTwist": { "position": { - "x": 0.6841667295, - "y": 1.4004839659, - "z": 0.0456768274 + "x": 0.6841670871, + "y": 1.4004844427, + "z": 0.045676887 }, "rotation": { - "x": -0.8247519732, - "y": 0.0213388987, - "z": -0.0524771027, - "w": 0.5626500845 + "x": -0.8247522116, + "y": 0.021339085, + "z": -0.0524773337, + "w": 0.5626501441 } }, "LeftHandPalm": { "position": { - "x": -0.7295179367, - "y": 1.3985207081, - "z": 0.0850063562 + "x": -0.7341293097, + "y": 1.3983211517, + "z": 0.0890052915 }, "rotation": { - "x": 0.9884797335, - "y": 0.0044170022, - "z": -0.0643293262, - "w": 0.1369333118 + "x": 0.9884798527, + "y": 0.0044170916, + "z": -0.0643292069, + "w": 0.1369332522 } }, "LeftHandWrist": { "position": { - "x": -0.7064647675, + "x": -0.7064651847, "y": 1.3995194435, - "z": 0.0650112629 + "z": 0.0650112033 }, "rotation": { - "x": 0.9884799123, - "y": 0.004417181, - "z": -0.0643297732, - "w": 0.1369328648 + "x": 0.9884797931, + "y": 0.0044172406000000008, + "z": -0.0643298924, + "w": 0.1369327456 } }, "LeftHandThumbMetacarpal": { "position": { - "x": -0.7380879521, + "x": -0.7380882502, "y": 1.3890032768, "z": 0.1015486121 }, "rotation": { - "x": -0.7352110147, - "y": 0.0941841155, - "z": 0.4187204242, - "w": 0.5246601701 + "x": -0.7352110744, + "y": 0.0941840932, + "z": 0.4187203348, + "w": 0.5246602297 } }, "LeftHandThumbProximal": { "position": { - "x": -0.7586229444, + "x": -0.7586232424, "y": 1.3792212009, - "z": 0.1247798204 + "z": 0.1247797608 }, "rotation": { - "x": -0.7955839634, - "y": 0.1607985198, - "z": 0.4098588228, - "w": 0.4161803126 + "x": -0.7955840826, + "y": 0.1607987732, + "z": 0.4098589122, + "w": 0.416180402 } }, "LeftHandThumbDistal": { "position": { - "x": -0.7793152332, + "x": -0.7793155909, "y": 1.3763389587, "z": 0.1513415575 }, "rotation": { - "x": -0.7189861536, - "y": 0.2131494582, - "z": 0.4694063067, - "w": 0.4661381841 + "x": -0.7189862728, + "y": 0.2131495178, + "z": 0.469406426, + "w": 0.4661383629 } }, "LeftHandThumbTip": { "position": { - "x": -0.7862787843, + "x": -0.7862792015, "y": 1.3743898869, - "z": 0.1643275023 + "z": 0.1643275619 }, "rotation": { - "x": -0.7189862728, - "y": 0.213149339, - "z": 0.4694062769, - "w": 0.4661382139 + "x": -0.7189863324, + "y": 0.2131495774, + "z": 0.4694062471, + "w": 0.4661383033 } }, "LeftHandIndexMetacarpal": { "position": { - "x": -0.7064647675, + "x": -0.7064651847, "y": 1.3995194435, - "z": 0.0650112629 + "z": 0.0650112033 }, "rotation": { - "x": 0.9884799123, - "y": 0.0044171214, - "z": -0.0643293262, - "w": 0.1369328052 + "x": 0.9884798527, + "y": 0.0044170916, + "z": -0.0643292964, + "w": 0.1369328499 } }, "LeftHandIndexProximal": { "position": { - "x": -0.7985026836, + "x": -0.7985031009, "y": 1.3997192383, "z": 0.1017852426 }, "rotation": { - "x": 0.9917354584, - "y": 0.0456247032, - "z": -0.0597351491, - "w": 0.1039804667 + "x": 0.991735518, + "y": 0.045624733, + "z": -0.0597351789, + "w": 0.1039803773 } }, "LeftHandIndexIntermediate": { "position": { - "x": -0.8360016942, + "x": -0.836001873, "y": 1.3967577219, "z": 0.1066389084 }, "rotation": { - "x": 0.9889602661, - "y": 0.0511575043, - "z": -0.0518195927, - "w": 0.1290589273 + "x": 0.9889605045, + "y": 0.0511572957, + "z": -0.0518196225, + "w": 0.1290590167 } }, "LeftHandIndexDistal": { "position": { - "x": -0.860047698, + "x": -0.8600480556, "y": 1.3946237564, - "z": 0.1094502807 + "z": 0.1094502211 }, "rotation": { - "x": 0.9889175892, - "y": -0.0159034729, + "x": 0.9889177084, + "y": -0.0159034133, "z": -0.0146915615, - "w": 0.1468821019 + "w": 0.1468822211 } }, "LeftHandIndexTip": { "position": { - "x": -0.8716198206, + "x": -0.8716201782, "y": 1.3950383663, "z": 0.1097333431 }, "rotation": { - "x": 0.9889175892, - "y": -0.0159035027, + "x": 0.9889177084, + "y": -0.0159034431, "z": -0.0146913826, - "w": 0.1468821466 + "w": 0.1468822956 } }, "LeftHandMiddleMetacarpal": { "position": { - "x": -0.7064647675, + "x": -0.7064651847, "y": 1.3995194435, - "z": 0.0650112629 + "z": 0.0650112033 }, "rotation": { - "x": 0.9884799123, - "y": 0.0044171214, - "z": -0.0643293262, - "w": 0.1369328052 + "x": 0.9884798527, + "y": 0.0044170916, + "z": -0.0643292964, + "w": 0.1369328499 } }, "LeftHandMiddleProximal": { "position": { - "x": -0.8010313511, + "x": -0.8010314703, "y": 1.3983898163, "z": 0.0796249509 }, "rotation": { "x": 0.986279726, - "y": 0.0519792736, - "z": -0.0604271591, - "w": 0.1445678473 + "y": 0.0519793928, + "z": -0.0604271889, + "w": 0.1445679218 } }, "LeftHandMiddleIntermediate": { "position": { - "x": -0.8434130549, + "x": -0.8434132934, "y": 1.3947384357, - "z": 0.0853867531 + "z": 0.0853866935 }, "rotation": { "x": 0.9849504232, - "y": 0.0513350964, - "z": -0.0552346706, - "w": 0.1555226892 + "y": 0.0513349473, + "z": -0.0552347004, + "w": 0.1555227935 } }, "LeftHandMiddleDistal": { "position": { - "x": -0.870649159, + "x": -0.870649457, "y": 1.3924257755, - "z": 0.0888242126 + "z": 0.0888240337 }, "rotation": { - "x": 0.9797796011, - "y": -0.037912786, - "z": -0.0341928005, - "w": 0.1934589148 + "x": 0.9797797203, + "y": -0.0379128456, + "z": -0.0341928601, + "w": 0.1934591532 } }, "LeftHandMiddleTip": { "position": { - "x": -0.8827881813, + "x": -0.8827884793, "y": 1.3934931755, - "z": 0.0894629955 + "z": 0.0894629359 }, "rotation": { - "x": 0.9797796011, + "x": 0.9797797203, "y": -0.037912339, - "z": -0.0341930985, - "w": 0.1934585422 + "z": -0.0341931283, + "w": 0.1934589446 } }, "LeftHandRingMetacarpal": { "position": { - "x": -0.7064647675, + "x": -0.7064651847, "y": 1.3995194435, - "z": 0.0650112629 + "z": 0.0650112033 }, "rotation": { - "x": 0.9884799123, - "y": 0.0044171214, - "z": -0.0643293262, - "w": 0.1369328052 + "x": 0.9884798527, + "y": 0.0044170916, + "z": -0.0643292964, + "w": 0.1369328499 } }, "LeftHandRingProximal": { "position": { - "x": -0.796448946, + "x": -0.796449244, "y": 1.3892848492, - "z": 0.0614962578 + "z": 0.0614961386 }, "rotation": { - "x": 0.9782334566, - "y": 0.0516892076, - "z": -0.0608412027, - "w": 0.1915378273 + "x": 0.9782335758, + "y": 0.0516891181, + "z": -0.0608412623, + "w": 0.1915378422 } }, "LeftHandRingIntermediate": { "position": { - "x": -0.834947288, + "x": -0.8349477053, "y": 1.3862500191, - "z": 0.0669105649 + "z": 0.0669105053 }, "rotation": { - "x": 0.9710950255, - "y": 0.0597926974, - "z": -0.0574243665, - "w": 0.2238358557 + "x": 0.9710952044, + "y": 0.059792757, + "z": -0.0574243069, + "w": 0.2238355875 } }, "LeftHandRingDistal": { "position": { - "x": -0.8611552715, - "y": 1.3838473558, - "z": 0.0705854893 + "x": -0.8611555696, + "y": 1.3838472366, + "z": 0.0705854297 }, "rotation": { - "x": 0.9694132805, - "y": 0.0291112959, - "z": -0.0799079835, - "w": 0.230229646 + "x": 0.9694135189, + "y": 0.0291114151, + "z": -0.0799081624, + "w": 0.2302297354 } }, "LeftHandRingTip": { "position": { - "x": -0.8729222417, + "x": -0.8729224801, "y": 1.3836129904, - "z": 0.0725954175 + "z": 0.0725952983 }, "rotation": { - "x": 0.9694132805, - "y": 0.0291112959, - "z": -0.0799079835, - "w": 0.230229646 + "x": 0.9694135189, + "y": 0.0291114151, + "z": -0.0799081624, + "w": 0.2302297354 } }, "LeftHandLittleMetacarpal": { "position": { - "x": -0.7429032326, + "x": -0.7429035306, "y": 1.384516716, - "z": 0.0499849319 + "z": 0.0499848127 }, "rotation": { - "x": 0.9374862909, - "y": 0.0549124181, - "z": 0.0748593211, - "w": 0.3354114294 + "x": 0.9374863505, + "y": 0.0549125075, + "z": 0.0748595595, + "w": 0.3354117274 } }, "LeftHandLittleProximal": { "position": { - "x": -0.7877671123, + "x": -0.7877672911, "y": 1.3775243759, - "z": 0.0452612638 + "z": 0.0452612042 }, "rotation": { - "x": 0.9619611502, - "y": 0.0622958243, + "x": 0.9619613886, + "y": 0.0622957945, "z": -0.0582970381, - "w": 0.2595230341 + "w": 0.2595227957 } }, "LeftHandLittleIntermediate": { "position": { - "x": -0.8180401325, - "y": 1.3747723103, - "z": 0.0497002602 + "x": -0.8180403113, + "y": 1.3747720718, + "z": 0.0497002006 }, "rotation": { - "x": 0.9538754225, - "y": 0.06274423, - "z": -0.0111011565, - "w": 0.2933629453 + "x": 0.9538756609, + "y": 0.0627442896, + "z": -0.0111010969, + "w": 0.2933632433 } }, "LeftHandLittleDistal": { @@ -3984,361 +3984,361 @@ "z": 0.0508779287 }, "rotation": { - "x": 0.953597188, - "y": 0.0253068507, - "z": -0.0509820282, - "w": 0.2956582308 + "x": 0.9535973072, + "y": 0.0253068209, + "z": -0.0509821177, + "w": 0.2956582904 } }, "LeftHandLittleTip": { "position": { - "x": -0.8500186801, - "y": 1.3722581863, - "z": 0.0522142649 + "x": -0.8500189781, + "y": 1.3722580671, + "z": 0.0522142053 }, "rotation": { - "x": 0.953597188, - "y": 0.0253068507, - "z": -0.0509820282, - "w": 0.2956582308 + "x": 0.9535973072, + "y": 0.0253068209, + "z": -0.0509821177, + "w": 0.2956582904 } }, "RightHandPalm": { "position": { - "x": 0.7295223475, - "y": 1.3985160589, - "z": 0.0850066543 + "x": 0.7341345549, + "y": 1.3983161449, + "z": 0.0890056491 }, "rotation": { - "x": -0.1369224787, - "y": -0.0643284172, - "z": -0.004417643, - "w": 0.988481164 + "x": -0.1369222403, + "y": -0.0643285662, + "z": -0.0044174343, + "w": 0.9884815216 } }, "RightHandWrist": { "position": { - "x": 0.7064643502, - "y": 1.3995168209, - "z": 0.0650115609 + "x": 0.7064650059, + "y": 1.3995170593, + "z": 0.0650116205 }, "rotation": { - "x": -0.1369242817, - "y": -0.0643284023, - "z": -0.0044181049, - "w": 0.9884810448 + "x": -0.1369241923, + "y": -0.0643285066, + "z": -0.0044179708, + "w": 0.9884811044 } }, "RightHandThumbMetacarpal": { "position": { - "x": 0.7380887269999999, - "y": 1.3890004158, - "z": 0.1015489101 + "x": 0.7380892038, + "y": 1.3890006542, + "z": 0.101549089 }, "rotation": { - "x": 0.5246649384, - "y": -0.4187210798, - "z": 0.0941791087, - "w": 0.7352074981 + "x": 0.5246649981, + "y": -0.4187213182, + "z": 0.0941790342, + "w": 0.7352075577 } }, "RightHandThumbProximal": { "position": { - "x": 0.7586246729, - "y": 1.3792175055, - "z": 0.1247801185 + "x": 0.7586252689, + "y": 1.3792177439, + "z": 0.1247801781 }, "rotation": { - "x": 0.4161853492, - "y": -0.4098590016, - "z": 0.160794735, - "w": 0.7955821753 + "x": 0.4161854684, + "y": -0.4098588824, + "z": 0.1607947946, + "w": 0.7955823541 } }, "RightHandThumbDistal": { "position": { - "x": 0.779316783, - "y": 1.3763352633, - "z": 0.1513415575 + "x": 0.7793172598, + "y": 1.3763355017, + "z": 0.1513416767 }, "rotation": { - "x": 0.4661433101, - "y": -0.4694080651, - "z": 0.2131446302, - "w": 0.718982935 + "x": 0.4661431909, + "y": -0.4694080353, + "z": 0.2131447941, + "w": 0.7189831734 } }, "RightHandThumbTip": { "position": { - "x": 0.7862786651, - "y": 1.3743858337, - "z": 0.1643280387 + "x": 0.7862790227, + "y": 1.3743860722, + "z": 0.1643283367 }, "rotation": { - "x": 0.469408989, + "x": 0.4694090486, "y": 0.4661408067, - "z": -0.7189844847, - "w": 0.2131428123 + "z": -0.7189845443, + "w": 0.2131429613 } }, "RightHandIndexMetacarpal": { "position": { - "x": 0.7064643502, - "y": 1.3995168209, - "z": 0.0650115609 + "x": 0.7064650059, + "y": 1.3995170593, + "z": 0.0650116205 }, "rotation": { - "x": -0.1369238645, - "y": -0.0643281043, - "z": -0.0044181645, - "w": 0.9884811044 + "x": -0.1369236857, + "y": -0.0643281192, + "z": -0.0044181794, + "w": 0.988481164 } }, "RightHandIndexProximal": { "position": { - "x": 0.7985032797, - "y": 1.3997154236, - "z": 0.1017853618 + "x": 0.7985036969, + "y": 1.3997159004, + "z": 0.1017855406 }, "rotation": { - "x": -0.1039715707, - "y": -0.0597256571, - "z": -0.0456284434, - "w": 0.9917365313 + "x": -0.1039714962, + "y": -0.0597256869, + "z": -0.0456284136, + "w": 0.9917366505 } }, "RightHandIndexIntermediate": { "position": { - "x": 0.8360021114, - "y": 1.3967548609, - "z": 0.1066383123 + "x": 0.8360025883, + "y": 1.3967552185, + "z": 0.1066383719 }, "rotation": { - "x": -0.1290511787, - "y": -0.0518089831, - "z": -0.0511614382, - "w": 0.9889615178 + "x": -0.1290509701, + "y": -0.0518089533, + "z": -0.0511615276, + "w": 0.9889616966 } }, "RightHandIndexDistal": { "position": { - "x": 0.8600487113, - "y": 1.3946201801, - "z": 0.1094498038 + "x": 0.8600493073, + "y": 1.3946204185, + "z": 0.1094501019 }, "rotation": { - "x": -0.1468733251, - "y": -0.0146818459, - "z": 0.0158996284, - "w": 0.9889187813 + "x": -0.1468733549, + "y": -0.0146817565, + "z": 0.0158994198, + "w": 0.9889190793 } }, "RightHandIndexTip": { "position": { - "x": 0.8716207743, - "y": 1.3950340748, - "z": 0.1097317338 + "x": 0.8716211915, + "y": 1.3950343132, + "z": 0.1097319126 }, "rotation": { - "x": -0.1468734741, - "y": -0.0146817416, - "z": 0.0158996135, - "w": 0.9889187813 + "x": -0.1468735486, + "y": -0.0146816969, + "z": 0.0158994198, + "w": 0.9889191985 } }, "RightHandMiddleMetacarpal": { "position": { - "x": 0.7064643502, - "y": 1.3995168209, - "z": 0.0650115609 + "x": 0.7064650059, + "y": 1.3995170593, + "z": 0.0650116205 }, "rotation": { - "x": -0.1369238645, - "y": -0.0643281043, - "z": -0.0044181645, - "w": 0.9884811044 + "x": -0.1369236857, + "y": -0.0643281192, + "z": -0.0044181794, + "w": 0.988481164 } }, "RightHandMiddleProximal": { "position": { - "x": 0.8010319471, - "y": 1.3983861208, + "x": 0.8010325432, + "y": 1.39838624, "z": 0.0796249509 }, "rotation": { - "x": -0.1445578933, + "x": -0.144557789, "y": -0.0604181141, - "z": -0.0519817919, - "w": 0.9862814546 + "z": -0.0519816726, + "w": 0.9862817526 } }, "RightHandMiddleIntermediate": { "position": { - "x": 0.8434135914, - "y": 1.3947348595, - "z": 0.085386157 + "x": 0.8434141874, + "y": 1.3947352171, + "z": 0.0853862166 }, "rotation": { - "x": -0.1555146873, + "x": -0.1555148661, "y": -0.0552256405, - "z": -0.051338166, - "w": 0.9849520922 + "z": -0.0513381064, + "w": 0.9849522114 } }, "RightHandMiddleDistal": { "position": { - "x": 0.870649457, - "y": 1.39242208, - "z": 0.0888229012 + "x": 0.8706499934, + "y": 1.3924224377, + "z": 0.0888230205 }, "rotation": { - "x": -0.1934488267, - "y": -0.03418459, - "z": 0.0379106849, - "w": 0.9797818661 + "x": -0.1934486479, + "y": -0.0341847092, + "z": 0.0379107445, + "w": 0.9797819257 } }, "RightHandMiddleTip": { "position": { - "x": 0.882789135, - "y": 1.3934900761, - "z": 0.0894618034 + "x": 0.882789433, + "y": 1.3934904337, + "z": 0.0894619823 }, "rotation": { - "x": -0.193448782, - "y": -0.0341843963, - "z": 0.0379106402, + "x": -0.1934486479, + "y": -0.0341844857, + "z": 0.0379107893, "w": 0.9797818661 } }, "RightHandRingMetacarpal": { "position": { - "x": 0.7064643502, - "y": 1.3995168209, - "z": 0.0650115609 + "x": 0.7064650059, + "y": 1.3995170593, + "z": 0.0650116205 }, "rotation": { - "x": -0.1369238645, - "y": -0.0643281043, - "z": -0.0044181645, - "w": 0.9884811044 + "x": -0.1369236857, + "y": -0.0643281192, + "z": -0.0044181794, + "w": 0.988481164 } }, "RightHandRingProximal": { "position": { - "x": 0.7964485288, - "y": 1.3892818689, - "z": 0.0614964366 + "x": 0.7964490056, + "y": 1.3892821074, + "z": 0.0614964962 }, "rotation": { - "x": -0.1915307939, - "y": -0.0608313382, - "z": -0.0516913831, - "w": 0.9782351851 + "x": -0.1915306449, + "y": -0.060831368, + "z": -0.0516913533, + "w": 0.9782353044 } }, "RightHandRingIntermediate": { "position": { - "x": 0.8349487185, - "y": 1.3862472773, - "z": 0.066909492 + "x": 0.8349493146, + "y": 1.3862476349, + "z": 0.0669096112 }, "rotation": { - "x": -0.22382918, - "y": -0.0574143976, - "z": -0.0597945303, - "w": 0.9710971117 + "x": -0.223828733, + "y": -0.0574144125, + "z": -0.0597946048, + "w": 0.9710972905 } }, "RightHandRingDistal": { "position": { - "x": 0.861156404, - "y": 1.3838444948, - "z": 0.0705843568 + "x": 0.8611568809, + "y": 1.3838447332, + "z": 0.070584476 }, "rotation": { - "x": -0.2302206755, + "x": -0.2302207202, "y": -0.0798986703, - "z": -0.0291126519, - "w": 0.9694161415 + "z": -0.0291125923, + "w": 0.9694163799 } }, "RightHandRingTip": { "position": { - "x": 0.8729236126, - "y": 1.3836104869999999, - "z": 0.0725938082 + "x": 0.872923851, + "y": 1.3836109638, + "z": 0.0725938678 }, "rotation": { - "x": -0.2302206755, + "x": -0.2302207202, "y": -0.0798986703, - "z": -0.0291126519, - "w": 0.9694161415 + "z": -0.0291125923, + "w": 0.9694163799 } }, "RightHandLittleMetacarpal": { "position": { - "x": 0.7429040074, - "y": 1.3845143318, - "z": 0.0499845147 + "x": 0.7429043651, + "y": 1.3845145702, + "z": 0.0499845743 }, "rotation": { - "x": -0.3354035616, + "x": -0.3354039192, "y": 0.0748616457, - "z": -0.0549131036, - "w": 0.9374890327 + "z": -0.054913044, + "w": 0.9374889135 } }, "RightHandLittleProximal": { "position": { - "x": 0.7877674103, - "y": 1.3775224686, - "z": 0.0452609062 + "x": 0.7877676487, + "y": 1.377522707, + "z": 0.0452608466 }, "rotation": { "x": -0.2595148087, "y": -0.0582893044, "z": -0.06229873, - "w": 0.961963594 + "w": 0.9619637728 } }, "RightHandLittleIntermediate": { "position": { - "x": 0.8180403709, - "y": 1.3747699261, - "z": 0.0496994257 + "x": 0.8180407286, + "y": 1.3747705221, + "z": 0.0496996045 }, "rotation": { "x": -0.2933551669, - "y": -0.0110933185, - "z": -0.0627461076, - "w": 0.9538779259 + "y": -0.0110933483, + "z": -0.0627460778, + "w": 0.9538781047 } }, "RightHandLittleDistal": { "position": { - "x": 0.8381870985, - "y": 1.3724703789, + "x": 0.8381875157, + "y": 1.3724707365, "z": 0.0508767962 }, "rotation": { - "x": -0.295651108, - "y": -0.0509740561, - "z": -0.025309965, - "w": 0.9535996914 + "x": -0.2956510782, + "y": -0.05097422, + "z": -0.0253098309, + "w": 0.9535998702 } }, "RightHandLittleTip": { "position": { - "x": 0.8500188589, - "y": 1.3722547293, - "z": 0.052212894 + "x": 0.8500193954, + "y": 1.3722550869, + "z": 0.0522129536 }, "rotation": { - "x": -0.2956519723, - "y": -0.0509741008, - "z": -0.0253097713, - "w": 0.9535991549 + "x": -0.2956520021, + "y": -0.05097422, + "z": -0.0253095925, + "w": 0.9535995722 } }, "LeftUpperLeg": { @@ -4357,7 +4357,7 @@ "LeftLowerLeg": { "position": { "x": -0.1371862292, - "y": 0.4833597541, + "y": 0.4833595753, "z": -0.029504627 }, "rotation": { @@ -4369,9 +4369,9 @@ }, "LeftFootAnkleTwist": { "position": { - "x": -0.1923232526, - "y": 0.0686267614, - "z": -0.0724931508 + "x": -0.1923232973, + "y": 0.0686262846, + "z": -0.0724931657 }, "rotation": { "x": -0.4802321196, @@ -4382,53 +4382,53 @@ }, "LeftFootAnkle": { "position": { - "x": -0.1923233122, - "y": 0.0686258078, - "z": -0.07249327 + "x": -0.1923233271, + "y": 0.0686255693, + "z": -0.0724932551 }, "rotation": { - "x": 0.058318764, - "y": -0.7403143644, - "z": 0.0647691786, - "w": 0.6665873528 + "x": 0.0583190322, + "y": -0.740314424, + "z": 0.0647688657, + "w": 0.6665874124 } }, "LeftFootSubtalar": { "position": { "x": -0.201701194, - "y": 0.0348718762, + "y": 0.0348716974, "z": -0.0671161413 }, "rotation": { - "x": -0.2156719267, - "y": -0.7455874681, - "z": 0.2862083614, - "w": 0.5618448853 + "x": -0.215671882, + "y": -0.7455875278, + "z": 0.2862083316, + "w": 0.561844945 } }, "LeftFootTransverse": { "position": { "x": -0.2021877021, - "y": 0.0453881621, - "z": -0.0069340914 + "y": 0.0453879237, + "z": -0.0069340616 }, "rotation": { - "x": -0.0847716331, + "x": -0.0847713649, "y": -0.7538981438, - "z": 0.0992555618, - "w": 0.643894434 + "z": 0.0992553383, + "w": 0.6438943744 } }, "LeftFootBall": { "position": { - "x": -0.2078967094, - "y": 0.0158250928, - "z": 0.0647976398 + "x": -0.207896769, + "y": 0.015824616, + "z": 0.0647977293 }, "rotation": { - "x": -0.000004798173904, + "x": -0.000005215406418, "y": -0.7840589285, - "z": 0.000002905726433, + "z": 0.000003319233656, "w": 0.6206867099 } }, @@ -4461,14 +4461,14 @@ "RightFootAnkleTwist": { "position": { "x": 0.1923229396, - "y": 0.0686304569, + "y": 0.0686305165, "z": -0.0724931359 }, "rotation": { - "x": 0.5365979671, - "y": -0.4637605846, + "x": 0.5365980268, + "y": -0.4637605548, "z": -0.5161066055, - "w": 0.4802321494 + "w": 0.4802321196 } }, "RightFootAnkle": { @@ -4479,48 +4479,48 @@ }, "rotation": { "x": -0.6665841937, - "y": 0.0647636056, + "y": 0.0647634864, "z": 0.7403174043, - "w": 0.0583210588 + "w": 0.0583211854 } }, "RightFootSubtalar": { "position": { - "x": 0.2017012239, + "x": 0.2017012388, "y": 0.034873426, "z": -0.0671164393 }, "rotation": { "x": 0.5618442297, - "y": -0.28620117900000005, + "y": -0.2862011492, "z": -0.7455914617, - "w": 0.2156704664 + "w": 0.2156704962 } }, "RightFootTransverse": { "position": { - "x": 0.2021876276, + "x": 0.2021876574, "y": 0.0453911424, - "z": -0.0069344044 + "z": -0.0069343895 }, "rotation": { - "x": 0.6438925862, - "y": -0.0992484093, - "z": -0.7539010644, - "w": 0.0847689956 + "x": 0.6438925266, + "y": -0.0992483199, + "z": -0.7539010048, + "w": 0.0847689211 } }, "RightFootBall": { "position": { - "x": 0.2078968138, - "y": 0.0158256292, - "z": 0.0647966713 + "x": 0.2078968436, + "y": 0.0158255696, + "z": 0.0647967011 }, "rotation": { - "x": 0.62068367, - "y": 0.000005006790161, - "z": -0.7840614915, - "w": 4.321336746e-7 + "x": 0.6206836104, + "y": 0.000004708766937, + "z": -0.7840613723, + "w": 7.227063179e-7 } } } @@ -4542,11 +4542,11 @@ "behavior": "normal", "mappings": { "pelvis_joint": { - "weightPosition": 0.4627328515, + "weightPosition": 0.4627319276, "weightRotation": 1.0 }, "spineLower_joint": { - "weightPosition": 0.5372672081, + "weightPosition": 0.5372681618, "weightRotation": 0.0 } } @@ -4556,11 +4556,11 @@ "behavior": "normal", "mappings": { "pelvis_joint": { - "weightPosition": 0.4851029217, + "weightPosition": 0.4851030111, "weightRotation": 0.0 }, "spineLower_joint": { - "weightPosition": 0.5148970485, + "weightPosition": 0.5148969889, "weightRotation": 1.0 } } @@ -4570,12 +4570,12 @@ "behavior": "normal", "mappings": { "spineMiddle_joint": { - "weightPosition": 0.6409920454, - "weightRotation": 0.6409920454 + "weightPosition": 0.6409940124, + "weightRotation": 0.6409940124 }, "spineUpper_joint": { - "weightPosition": 0.3590079546, - "weightRotation": 0.3590079546 + "weightPosition": 0.3590059876, + "weightRotation": 0.3590059876 } } }, @@ -4584,12 +4584,12 @@ "behavior": "normal", "mappings": { "spineUpper_joint": { - "weightPosition": 0.5655583739, - "weightRotation": 0.5655583739 + "weightPosition": 0.5655599833, + "weightRotation": 0.5655599833 }, "chest_joint": { - "weightPosition": 0.4344416261, - "weightRotation": 0.4344416261 + "weightPosition": 0.4344400167, + "weightRotation": 0.4344400167 } } }, @@ -4598,7 +4598,7 @@ "behavior": "normal", "mappings": { "chest_joint": { - "weightPosition": 0.4150128663, + "weightPosition": 0.4150128067, "weightRotation": 1.0 }, "clavicle_right_joint": { @@ -4612,8 +4612,12 @@ "behavior": "normal", "mappings": { "neck_joint": { - "weightPosition": 1.0, + "weightPosition": 0.5498082042, "weightRotation": 1.0 + }, + "head_joint": { + "weightPosition": 0.450191766, + "weightRotation": 0.0 } } }, @@ -4632,7 +4636,7 @@ "behavior": "normal", "mappings": { "shoulder_left_joint": { - "weightPosition": 0.0, + "weightPosition": 1.0, "weightRotation": 1.0 } } @@ -4687,7 +4691,7 @@ }, "LeftHandWristTwist": { "source": { - "behavior": "normal", + "behavior": "twist", "mappings": { "handWrist_left_joint": { "weightPosition": 1.0, @@ -4724,7 +4728,7 @@ "behavior": "normal", "mappings": { "shoulder_right_joint": { - "weightPosition": 0.0, + "weightPosition": 1.0, "weightRotation": 1.0 } } @@ -4779,7 +4783,7 @@ }, "RightHandWristTwist": { "source": { - "behavior": "normal", + "behavior": "twist", "mappings": { "handWrist_right_joint": { "weightPosition": 1.0, @@ -4926,15 +4930,15 @@ "behavior": "normal", "mappings": { "pelvis_joint": { - "weightPosition": 0.0968043953, + "weightPosition": 0.0968037248, "weightRotation": 0.0 }, "hip_left_joint": { - "weightPosition": 0.8081628084, + "weightPosition": 0.8081641793, "weightRotation": 1.0 }, "spineLower_joint": { - "weightPosition": 0.0950327963, + "weightPosition": 0.0950321332, "weightRotation": 0.0 } } @@ -4979,7 +4983,7 @@ }, "LeftFootAnkleTwist": { "source": { - "behavior": "normal", + "behavior": "twist", "mappings": { "footAnkle_left_joint": { "weightPosition": 1.0, @@ -5040,15 +5044,15 @@ "behavior": "normal", "mappings": { "pelvis_joint": { - "weightPosition": 0.0968046412, + "weightPosition": 0.0968039855, "weightRotation": 0.0 }, "hip_right_joint": { - "weightPosition": 0.8081623316, + "weightPosition": 0.8081636429, "weightRotation": 1.0 }, "spineLower_joint": { - "weightPosition": 0.0950330198, + "weightPosition": 0.0950323716, "weightRotation": 0.0 } } @@ -5093,7 +5097,7 @@ }, "RightFootAnkleTwist": { "source": { - "behavior": "normal", + "behavior": "twist", "mappings": { "footAnkle_right_joint": { "weightPosition": 1.0, @@ -5166,11 +5170,11 @@ "behavior": "normal", "mappings": { "pelvis_joint": { - "weightPosition": 0.462733835, + "weightPosition": 0.4627372324, "weightRotation": 1.0 }, "spineLower_joint": { - "weightPosition": 0.5372661948, + "weightPosition": 0.5372627974, "weightRotation": 0.0 } } @@ -5180,11 +5184,11 @@ "behavior": "normal", "mappings": { "pelvis_joint": { - "weightPosition": 0.4851028621, + "weightPosition": 0.4851030409, "weightRotation": 0.0 }, "spineLower_joint": { - "weightPosition": 0.5148971081, + "weightPosition": 0.5148969889, "weightRotation": 1.0 } } @@ -5194,12 +5198,12 @@ "behavior": "normal", "mappings": { "spineMiddle_joint": { - "weightPosition": 0.6409920454, - "weightRotation": 0.6409920454 + "weightPosition": 0.6409957409, + "weightRotation": 0.6409957409 }, "spineUpper_joint": { - "weightPosition": 0.359007895, - "weightRotation": 0.359007895 + "weightPosition": 0.3590042591, + "weightRotation": 0.3590042591 } } }, @@ -5208,12 +5212,12 @@ "behavior": "normal", "mappings": { "spineUpper_joint": { - "weightPosition": 0.5655604601, - "weightRotation": 0.5655604601 + "weightPosition": 0.5655617714, + "weightRotation": 0.5655617714 }, "chest_joint": { - "weightPosition": 0.4344395697, - "weightRotation": 0.4344395697 + "weightPosition": 0.4344381988, + "weightRotation": 0.4344381988 } } }, @@ -5222,11 +5226,11 @@ "behavior": "normal", "mappings": { "chest_joint": { - "weightPosition": 0.415011555, + "weightPosition": 0.4150132239, "weightRotation": 1.0 }, "clavicle_right_joint": { - "weightPosition": 0.5849884152, + "weightPosition": 0.5849868059, "weightRotation": 0.0 } } @@ -5236,8 +5240,12 @@ "behavior": "normal", "mappings": { "neck_joint": { - "weightPosition": 1.0, + "weightPosition": 0.554409802, "weightRotation": 1.0 + }, + "head_joint": { + "weightPosition": 0.4455902576, + "weightRotation": 0.0 } } }, @@ -5256,7 +5264,7 @@ "behavior": "normal", "mappings": { "shoulder_left_joint": { - "weightPosition": 0.0, + "weightPosition": 1.0, "weightRotation": 1.0 } } @@ -5311,7 +5319,7 @@ }, "LeftHandWristTwist": { "source": { - "behavior": "normal", + "behavior": "twist", "mappings": { "handWrist_left_joint": { "weightPosition": 1.0, @@ -5348,7 +5356,7 @@ "behavior": "normal", "mappings": { "shoulder_right_joint": { - "weightPosition": 0.0, + "weightPosition": 1.0, "weightRotation": 1.0 } } @@ -5403,7 +5411,7 @@ }, "RightHandWristTwist": { "source": { - "behavior": "normal", + "behavior": "twist", "mappings": { "handWrist_right_joint": { "weightPosition": 1.0, @@ -5550,15 +5558,15 @@ "behavior": "normal", "mappings": { "pelvis_joint": { - "weightPosition": 0.0968048275, + "weightPosition": 0.0967996493, "weightRotation": 0.0 }, "hip_left_joint": { - "weightPosition": 0.808161974, + "weightPosition": 0.8081722856, "weightRotation": 1.0 }, "spineLower_joint": { - "weightPosition": 0.0950331986, + "weightPosition": 0.0950280502, "weightRotation": 0.0 } } @@ -5603,7 +5611,7 @@ }, "LeftFootAnkleTwist": { "source": { - "behavior": "normal", + "behavior": "twist", "mappings": { "footAnkle_left_joint": { "weightPosition": 1.0, @@ -5664,15 +5672,15 @@ "behavior": "normal", "mappings": { "pelvis_joint": { - "weightPosition": 0.0968017653, + "weightPosition": 0.0967998356, "weightRotation": 0.0 }, "hip_right_joint": { - "weightPosition": 0.8081680536, + "weightPosition": 0.8081719279, "weightRotation": 1.0 }, "spineLower_joint": { - "weightPosition": 0.0950301364, + "weightPosition": 0.0950282142, "weightRotation": 0.0 } } @@ -5717,7 +5725,7 @@ }, "RightFootAnkleTwist": { "source": { - "behavior": "normal", + "behavior": "twist", "mappings": { "footAnkle_right_joint": { "weightPosition": 1.0, @@ -5775,4 +5783,4 @@ } } } -} +} \ No newline at end of file diff --git a/Runtime/Native/Data/OVRSkeletonData.json b/Runtime/Native/Data/OVRSkeletonData.json index e6e048d..00253b9 100644 --- a/Runtime/Native/Data/OVRSkeletonData.json +++ b/Runtime/Native/Data/OVRSkeletonData.json @@ -25,6 +25,12 @@ } }, "source": { + "format": { + "jointSpaceType": "RootOriginRelative", + "skeletonFlags": { + "noRotationCorrectionOnCoordConversion": true + } + }, "joints": [ "Root", "Hips", diff --git a/Runtime/Native/Plugins/Android/MetaMovementSDK_AIMotionSynthesizer.aar b/Runtime/Native/Plugins/Android/MetaMovementSDK_AIMotionSynthesizer.aar index 40aa4cb..56c44ac 100644 Binary files a/Runtime/Native/Plugins/Android/MetaMovementSDK_AIMotionSynthesizer.aar and b/Runtime/Native/Plugins/Android/MetaMovementSDK_AIMotionSynthesizer.aar differ diff --git a/Runtime/Native/Plugins/Android/MetaMovementSDK_AIMotionSynthesizer.aar.meta b/Runtime/Native/Plugins/Android/MetaMovementSDK_AIMotionSynthesizer.aar.meta index 105a59e..d27b7ac 100644 --- a/Runtime/Native/Plugins/Android/MetaMovementSDK_AIMotionSynthesizer.aar.meta +++ b/Runtime/Native/Plugins/Android/MetaMovementSDK_AIMotionSynthesizer.aar.meta @@ -1,70 +1,2 @@ fileFormatVersion: 2 -guid: 8ea8dce1e561e204bb921154fe568787 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 1 - isOverridable: 1 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - : Any - second: - enabled: 0 - settings: - Exclude Android: 0 - Exclude Editor: 1 - Exclude Linux64: 1 - Exclude OSXUniversal: 1 - Exclude Win: 1 - Exclude Win64: 1 - - first: - Android: Android - second: - enabled: 1 - settings: - CPU: ARM64 - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - - first: - Standalone: Linux64 - second: - enabled: 0 - settings: - CPU: AnyCPU - - first: - Standalone: OSXUniversal - second: - enabled: 0 - settings: - CPU: None - - first: - Standalone: Win - second: - enabled: 0 - settings: - CPU: x86 - - first: - Standalone: Win64 - second: - enabled: 0 - settings: - CPU: x86_64 - userData: - assetBundleName: - assetBundleVariant: +guid: 8ea8dce1e561e204bb921154fe568787 \ No newline at end of file diff --git a/Runtime/Native/Plugins/Android/MetaMovementSDK_Utility.aar b/Runtime/Native/Plugins/Android/MetaMovementSDK_Utility.aar index 70fb93b..ee5c7e7 100644 Binary files a/Runtime/Native/Plugins/Android/MetaMovementSDK_Utility.aar and b/Runtime/Native/Plugins/Android/MetaMovementSDK_Utility.aar differ diff --git a/Runtime/Native/Plugins/Linux/MetaMovementSDK_Utility.so b/Runtime/Native/Plugins/Linux/MetaMovementSDK_Utility.so index 023f6d0..3b9db81 100644 Binary files a/Runtime/Native/Plugins/Linux/MetaMovementSDK_Utility.so and b/Runtime/Native/Plugins/Linux/MetaMovementSDK_Utility.so differ diff --git a/Runtime/Native/Plugins/Mac/MetaMovementSDK_Utility.dylib b/Runtime/Native/Plugins/Mac/MetaMovementSDK_Utility.dylib index 6374d1c..f3853ff 100644 Binary files a/Runtime/Native/Plugins/Mac/MetaMovementSDK_Utility.dylib and b/Runtime/Native/Plugins/Mac/MetaMovementSDK_Utility.dylib differ diff --git a/Runtime/Native/Plugins/Win64/MetaMovementSDK_AIMotionSynthesizer.dll b/Runtime/Native/Plugins/Win64/MetaMovementSDK_AIMotionSynthesizer.dll index 71d432e..2b32a02 100644 Binary files a/Runtime/Native/Plugins/Win64/MetaMovementSDK_AIMotionSynthesizer.dll and b/Runtime/Native/Plugins/Win64/MetaMovementSDK_AIMotionSynthesizer.dll differ diff --git a/Runtime/Native/Plugins/Win64/MetaMovementSDK_AIMotionSynthesizer.dll.meta b/Runtime/Native/Plugins/Win64/MetaMovementSDK_AIMotionSynthesizer.dll.meta index cb5dcad..949a2b9 100644 --- a/Runtime/Native/Plugins/Win64/MetaMovementSDK_AIMotionSynthesizer.dll.meta +++ b/Runtime/Native/Plugins/Win64/MetaMovementSDK_AIMotionSynthesizer.dll.meta @@ -1,27 +1,2 @@ fileFormatVersion: 2 -guid: 6353d20ddf3eaed418da78f1889dc5bc -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 1 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: +guid: 6353d20ddf3eaed418da78f1889dc5bc \ No newline at end of file diff --git a/Runtime/Native/Plugins/Win64/MetaMovementSDK_Utility.dll b/Runtime/Native/Plugins/Win64/MetaMovementSDK_Utility.dll index 30bd661..1572eb6 100644 Binary files a/Runtime/Native/Plugins/Win64/MetaMovementSDK_Utility.dll and b/Runtime/Native/Plugins/Win64/MetaMovementSDK_Utility.dll differ diff --git a/Runtime/Native/Plugins/Win64/fbl_v5_ffi.dll b/Runtime/Native/Plugins/Win64/fbl_v5_ffi.dll index a136231..5252ff8 100644 Binary files a/Runtime/Native/Plugins/Win64/fbl_v5_ffi.dll and b/Runtime/Native/Plugins/Win64/fbl_v5_ffi.dll differ diff --git a/Runtime/Native/Plugins/Win64/fbl_v5_ffi.dll.meta b/Runtime/Native/Plugins/Win64/fbl_v5_ffi.dll.meta index c32d62f..8955fc6 100644 --- a/Runtime/Native/Plugins/Win64/fbl_v5_ffi.dll.meta +++ b/Runtime/Native/Plugins/Win64/fbl_v5_ffi.dll.meta @@ -1,27 +1,2 @@ fileFormatVersion: 2 -guid: 9fe91427ad4c2aa49a79492a3cc52910 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 1 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: +guid: 9fe91427ad4c2aa49a79492a3cc52910 \ No newline at end of file diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizer.cs b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizer.cs index 11dea2b..dd1a77f 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizer.cs +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizer.cs @@ -67,7 +67,8 @@ public bool Initialize() return false; } - if (!MSDKAIMotionSynthesizer.Initialize(_aiMotionSynthesizerHandle, _config.ModelAsset.bytes, _config.GuidanceAsset?.bytes)) + if (!MSDKAIMotionSynthesizer.Initialize(_aiMotionSynthesizerHandle, _config.ModelAsset.bytes, + _config.GuidanceAsset?.bytes)) { Debug.LogError("[AIMotionSynthesizerIntegration] Failed to initialize AIMotionSynthesizer"); MSDKAIMotionSynthesizer.DestroyHandle(_aiMotionSynthesizerHandle); @@ -75,9 +76,11 @@ public bool Initialize() return false; } - if (!MSDKAIMotionSynthesizer.GetSkeletonInfo(_aiMotionSynthesizerHandle, SkeletonType.TargetSkeleton, out var skeletonInfo)) + if (!MSDKAIMotionSynthesizer.GetSkeletonInfo(_aiMotionSynthesizerHandle, SkeletonType.TargetSkeleton, + out var skeletonInfo)) { - Debug.LogError("[AIMotionSynthesizerIntegration] Failed to get skeleton info from AIMotionSynthesizer handle"); + Debug.LogError( + "[AIMotionSynthesizerIntegration] Failed to get skeleton info from AIMotionSynthesizer handle"); MSDKAIMotionSynthesizer.DestroyHandle(_aiMotionSynthesizerHandle); _aiMotionSynthesizerHandle = MSDKAIMotionSynthesizer.INVALID_HANDLE; return false; @@ -138,20 +141,32 @@ public NativeArray GetBlendedPose(NativeArray return bodyTrackingPose; } - if (!bodyTrackingPose.IsCreated) - { - return default; - } - _bodyPose.CopyFrom(bodyTrackingPose); + // Root Motion Mode determines how skeleton joints are positioned relative to root: + // - None: Use native None mode - root joint zeroed, hips retain position, no root motion extraction. + // The root transform is NOT modified. Skeleton stays at origin without any root motion. + // - ApplyRootMotion: Use LocalSpace - skeleton joints relative to extracted root. + // The root pose (XZ translation + yaw) is applied to the transform. + // - ApplyFromReference: Use LocalSpace - skeleton joints relative to extracted root. + // The root transform follows the reference transform. Hips are local to character space. + var nativeRootMotionMode = _config.RootMotionMode switch + { + RootMotionMode.None => MSDKAIMotionSynthesizer.RootMotionMode.None, + RootMotionMode.ApplyRootMotion => MSDKAIMotionSynthesizer.RootMotionMode.LocalSpace, + RootMotionMode.ApplyFromReference => MSDKAIMotionSynthesizer.RootMotionMode.LocalSpace, + _ => MSDKAIMotionSynthesizer.RootMotionMode.LocalSpace + }; + bool success; if (_config.EnableSynthesizedStandingPose) { - success = MSDKAIMotionSynthesizer.GetSynthesizedAIMotionSynthesizerPoseByRef( + success = MSDKAIMotionSynthesizer.GetSynthesizedPoseByRef( _aiMotionSynthesizerHandle, bodyTrackingPose, - 1f, + _currentBlendFactor, + _config.RootAlignmentDirection, + nativeRootMotionMode, ref _blendedPose, out _aiMotionSynthesizerRootPose); @@ -163,12 +178,14 @@ public NativeArray GetBlendedPose(NativeArray } else { - success = MSDKAIMotionSynthesizer.GetBlendedAIMotionSynthesizerPoseByRef( + success = MSDKAIMotionSynthesizer.GetBlendedPoseByRef( _aiMotionSynthesizerHandle, bodyTrackingPose, _config.UpperBodySource, _config.LowerBodySource, + _config.RootAlignmentDirection, _currentBlendFactor, + nativeRootMotionMode, ref _blendedPose, out _aiMotionSynthesizerRootPose); @@ -184,25 +201,34 @@ public NativeArray GetBlendedPose(NativeArray /// /// Applies root motion to the root transform based on . + /// Call this in LateUpdate after GetBlendedPose. /// + /// + /// - : Does nothing. Root transform is not modified. + /// Hips are positioned in world space (relative to origin). + /// - : Applies the AI Motion Synthesizer root pose + /// (XZ translation + yaw rotation) to the root transform. Hips are local to character space. + /// - : Copies the reference transform's local position + /// and rotation to root. Hips are local to character space. + /// public void ApplyRootMotion() { switch (_config.RootMotionMode) { case RootMotionMode.None: + // Root transform remains untouched - do nothing break; - - case RootMotionMode.ApplyFromReference: - if (_config.ReferenceTransform != null) - { - _rootTransform.position = _config.ReferenceTransform.position; - _rootTransform.rotation = _config.ReferenceTransform.rotation; - } - break; - case RootMotionMode.ApplyRootMotion: - _rootTransform.position = _aiMotionSynthesizerRootPose.Position; - _rootTransform.rotation = _aiMotionSynthesizerRootPose.Orientation; + // Apply the AI Motion Synthesizer root pose to the transform + _rootTransform.SetLocalPositionAndRotation( + _aiMotionSynthesizerRootPose.Position, + _aiMotionSynthesizerRootPose.Orientation); + break; + case RootMotionMode.ApplyFromReference: + // Copy the reference transform's position and rotation to root + _rootTransform.SetLocalPositionAndRotation( + _config.ReferenceTransform.localPosition, + _config.ReferenceTransform.localRotation); break; } } @@ -211,7 +237,8 @@ public void ApplyRootMotion() /// Draws debug visualization of the AI motion synthesizer skeleton. /// Only draws if is enabled. /// - public void DrawVisualization(NativeArray bodyTrackingPose, NativeArray blendedPose, Pose rootTransform = default) + public void DrawVisualization(NativeArray bodyTrackingPose, + NativeArray blendedPose, Pose rootTransform = default) { if (!_config.DebugDrawAIMotionSynthesizer) { @@ -229,12 +256,14 @@ public void DrawVisualization(NativeArray bodyTrackingPose, Nat } // Draw AIMotionSynthesizer pose only - MSDKAIMotionSynthesizer.GetBlendedAIMotionSynthesizerPose( + MSDKAIMotionSynthesizer.GetBlendedPose( _aiMotionSynthesizerHandle, _bodyPose, MSDKAIMotionSynthesizer.PoseSource.AIMotionSynthesizer, MSDKAIMotionSynthesizer.PoseSource.AIMotionSynthesizer, + _config.RootAlignmentDirection, 1.0f, + MSDKAIMotionSynthesizer.RootMotionMode.WorldSpace, out var aiMotionSynthesizerPose, out var rootPose); MeshDraw.DrawSkeleton(aiMotionSynthesizerPose, _parentIndices, _config.DebugAIMotionSynthesizerColor); @@ -300,7 +329,8 @@ private void UpdateBlendFactor(bool isInputActive, float deltaTime) if (blendTime > 0f) { - _currentBlendFactor = Mathf.MoveTowards(_currentBlendFactor, targetBlendFactor, deltaTime / blendTime); + _currentBlendFactor = + Mathf.MoveTowards(_currentBlendFactor, targetBlendFactor, deltaTime / blendTime); } else { @@ -325,7 +355,8 @@ private void CastInputProvider() _runtimeInputProvider = _config.InputProvider as IAIMotionSynthesizerInputProvider; if (_runtimeInputProvider == null) { - Debug.LogError($"[AIMotionSynthesizerIntegration] MonoBehaviour {_config.InputProvider.name} does not implement IAIMotionSynthesizerInputProvider"); + Debug.LogError( + $"[AIMotionSynthesizerIntegration] MonoBehaviour {_config.InputProvider.name} does not implement IAIMotionSynthesizerInputProvider"); } } else @@ -333,10 +364,10 @@ private void CastInputProvider() _runtimeInputProvider = null; if (_config.BlendMode == BlendMode.Input) { - Debug.LogWarning("[AIMotionSynthesizerIntegration] BlendMode is set to Input but no InputProvider is assigned"); + Debug.LogWarning( + "[AIMotionSynthesizerIntegration] BlendMode is set to Input but no InputProvider is assigned"); } } } - } } diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizer.cs.meta b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizer.cs.meta index cd04b83..4023718 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizer.cs.meta +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizer.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 25d548336b953ed4e818a6c958e74323 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 25d548336b953ed4e818a6c958e74323 \ No newline at end of file diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfig.cs b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfig.cs index 29bd455..b148bb5 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfig.cs +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfig.cs @@ -24,15 +24,24 @@ public enum BlendMode /// public enum RootMotionMode { - /// No root motion applied. - [Tooltip("Do not apply root motion")] + /// + /// Root transform is not modified. Hips are positioned relative to Root at origin (0,0,0). + /// Use this when you don't want the AI Motion Synthesizer to control the character's root position. + /// + [Tooltip("Do not apply root motion. Root transform remains untouched.")] None, - /// Copy position/rotation from . - [Tooltip("Apply root motion from reference")] + /// + /// Same behavior as None for pose computation, but in LateUpdate the reference transform's + /// position and rotation are copied to the root transform. + /// + [Tooltip("Apply root motion from reference transform in LateUpdate")] ApplyFromReference, - /// Apply root motion computed by the AI motion synthesizer system. + /// + /// Root transform is driven by the AI Motion Synthesizer. Hips are positioned relative to Root. + /// The root pose (XZ translation + yaw rotation) is applied to the transform. + /// [Tooltip("Apply root motion from AIMotionSynthesizer")] ApplyRootMotion } @@ -79,6 +88,10 @@ public class AIMotionSynthesizerConfig [Tooltip("Which pose to use for lower body when blend factor = 1 (hips and legs)")] public MSDKAIMotionSynthesizer.PoseSource LowerBodySource = MSDKAIMotionSynthesizer.PoseSource.AIMotionSynthesizer; + /// Which pose's root forward direction to align to during blending. + [Tooltip("Which pose's forward direction to align to during blending. BodyTracking: blended result follows user's facing direction. AIMotionSynthesizer: blended result follows procedural animation direction.")] + public MSDKAIMotionSynthesizer.RootAlignmentDirection RootAlignmentDirection = MSDKAIMotionSynthesizer.RootAlignmentDirection.BodyTracking; + /// Whether blend factor is controlled manually or by input activity. [Tooltip("How to control the blend factor between body tracking and AIMotionSynthesizer")] public BlendMode BlendMode = BlendMode.Input; diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfig.cs.meta b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfig.cs.meta index d01298a..1a3379a 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfig.cs.meta +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerConfig.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 4c18c46393a8eeb47823d7b2adb23ee2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 4c18c46393a8eeb47823d7b2adb23ee2 \ No newline at end of file diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInput.cs b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInput.cs index c21134a..466d9d7 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInput.cs +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInput.cs @@ -5,10 +5,6 @@ using UnityEngine.InputSystem; #endif -#if UNITY_EDITOR -using UnityEditor; -#endif - namespace Meta.XR.Movement.AI { /// @@ -26,6 +22,42 @@ public enum InputMode Both } + /// + /// Movement direction mode for . + /// + public enum MovementDirectionMode + { + /// + /// Relative: joystick input is relative to the reference transform. + /// Forward moves toward where the reference is facing. + /// + Relative, + + /// + /// Absolute: joystick input maps directly to world axes. + /// Up=+Z, Down=-Z, Right=+X, Left=-X. + /// + Absolute + } + + /// + /// Facing direction mode for . + /// Controls how the character's facing direction is determined. + /// + public enum FacingDirectionMode + { + /// + /// Character faces the direction of movement velocity. + /// + FaceMovementDirection, + + /// + /// Character maintains the reference transform's forward direction. + /// Useful for strafing or keeping focus on a target. + /// + FaceReferenceForward + } + /// /// Joystick input provider for AI Motion Synthesizer. /// Supports OVRInput, Unity Input System, or both simultaneously. @@ -42,18 +74,17 @@ public class AIMotionSynthesizerJoystickInput : MonoBehaviour, IAIMotionSynthesi public bool IsInputActive() => _inputActive; /// - public Transform GetReferenceTransform() => _referenceTransform; + public Transform GetReferenceTransform() => _referenceTransform != null ? _referenceTransform : transform; [SerializeField] [Tooltip("Select which input system to use")] private InputMode _inputMode = InputMode.OVRInput; [SerializeField] - [Tooltip("Reference transform for input calculations. Determines coordinate space for velocity/direction. Defaults to camera rig if not set.")] + [Tooltip( + "Reference transform for input calculations. Determines coordinate space for velocity/direction. If empty, uses this component's transform.")] private Transform _referenceTransform; - private OVRCameraRig _cameraRig; - #if USE_UNITY_INPUT_SYSTEM [SerializeField] [Tooltip("Move action (left stick) using Unity's Input System")] @@ -105,62 +136,33 @@ public class AIMotionSynthesizerJoystickInput : MonoBehaviour, IAIMotionSynthesi [Range(0f, 1f)] private float _joystickThreshold = 0.25f; - private bool _inputActive; - private Vector3 _currentVelocity = Vector3.zero; - private Vector3 _currentDirection = Vector3.forward; - private Vector3 _targetVelocity = Vector3.zero; - private Vector3 _actualVelocity = Vector3.zero; + [SerializeField] + [Tooltip("Movement direction mode: Relative or Absolute")] + private MovementDirectionMode _movementDirectionMode = MovementDirectionMode.Relative; - private void Start() - { - AutoAssignCameraRig(); - if (_referenceTransform == null && _cameraRig != null) - { - _referenceTransform = _cameraRig.transform; - } - } + [SerializeField] + [Tooltip("Facing direction mode: determines how the character's facing direction is calculated")] + private FacingDirectionMode _facingDirectionMode = FacingDirectionMode.FaceMovementDirection; -#if UNITY_EDITOR - private void Reset() - { - AutoAssignCameraRig(); - if (_referenceTransform == null && _cameraRig != null) - { - _referenceTransform = _cameraRig.transform; - EditorUtility.SetDirty(this); - } - } + [SerializeField] + [Tooltip("Lock direction at input start until stop. Useful for strafing.")] + private bool _lockDirectionOnInputStart; - private void OnValidate() - { - AutoAssignCameraRig(); - if (_referenceTransform == null && _cameraRig != null) - { - _referenceTransform = _cameraRig.transform; - EditorUtility.SetDirty(this); - } - } -#endif + private bool _inputActive; + private Vector3 _currentVelocity; + private Vector3 _currentDirection = Vector3.forward; + private Vector3 _targetVelocity; + + private bool _hasCapturedMoveReferenceForward; + private Vector3 _capturedMoveReferenceForward = Vector3.forward; + private bool _hasCapturedLookReferenceForward; + private Vector3 _capturedLookReferenceForward = Vector3.forward; private void Update() { CalculateVelocityAndDirection(); } - private void AutoAssignCameraRig() - { - if (_cameraRig == null) - { - _cameraRig = FindAnyObjectByType(); -#if UNITY_EDITOR - if (_cameraRig != null) - { - EditorUtility.SetDirty(this); - } -#endif - } - } - private (Vector2 move, Vector2 look, bool sprint) ReadOVRInput() { return ( @@ -217,47 +219,110 @@ private void AutoAssignCameraRig() } } - private Vector3 ApplyDeadzone(Vector3 input) + private Vector3 ApplyDeadzone(Vector2 input) { - return input.magnitude < _joystickThreshold - ? Vector3.zero - : Vector3.ClampMagnitude(input, 1f); + var input3D = new Vector3(input.x, 0f, input.y); + var magnitude = input3D.magnitude; + if (magnitude < _joystickThreshold) + { + return Vector3.zero; + } + var scaledMagnitude = (magnitude - _joystickThreshold) / (1f - _joystickThreshold); + return input3D.normalized * Mathf.Clamp01(scaledMagnitude); + } + + private Vector3 GetReferenceForward( + bool hasInput, + Vector3 currentForward, + ref bool hasCapturedForward, + ref Vector3 capturedForward) + { + if (!_lockDirectionOnInputStart || !hasInput) + { + hasCapturedForward = false; + return currentForward; + } + + if (!hasCapturedForward) + { + capturedForward = currentForward; + hasCapturedForward = true; + } + return capturedForward; } private void CalculateVelocityAndDirection() { var (moveInput, lookInput, isSprinting) = ReadInputForMode(); - var referenceRotation = _referenceTransform != null - ? Quaternion.Euler(0, _referenceTransform.eulerAngles.y, 0) - : Quaternion.identity; + var move = ApplyDeadzone(moveInput); + var look = ApplyDeadzone(lookInput); - var move = ApplyDeadzone(new Vector3(moveInput.x, 0f, moveInput.y)); - var look = ApplyDeadzone(new Vector3(lookInput.x, 0f, lookInput.y)); + var currentReferenceForward = _referenceTransform != null + ? Vector3.ProjectOnPlane(_referenceTransform.forward, Vector3.up).normalized + : Vector3.forward; - _inputActive = move.magnitude > 0f || look.magnitude > 0f; + if (currentReferenceForward.sqrMagnitude < 0.001f) + { + currentReferenceForward = Vector3.forward; + } + + var moveReferenceForward = GetReferenceForward( + move.magnitude > 0f, + currentReferenceForward, + ref _hasCapturedMoveReferenceForward, + ref _capturedMoveReferenceForward); + + var lookReferenceForward = GetReferenceForward( + look.magnitude > 0f, + currentReferenceForward, + ref _hasCapturedLookReferenceForward, + ref _capturedLookReferenceForward); + var moveRotation = GetDirectionRotation(moveReferenceForward); + var lookRotation = GetDirectionRotation(lookReferenceForward); + + _inputActive = move.magnitude > 0f || look.magnitude > 0f; _targetVelocity = Vector3.zero; + if (move.magnitude > 0f) { - var rotatedMove = referenceRotation * move; - var speedMultiplier = isSprinting ? _sprintSpeedFactor : _speedFactor; - _targetVelocity = rotatedMove * speedMultiplier; + var worldMove = moveRotation * move; + var speed = isSprinting ? _sprintSpeedFactor : _speedFactor; + _targetVelocity = worldMove * speed; } - float deltaTime = Time.deltaTime; - var lerpFactor = _targetVelocity.magnitude > 0f ? _acceleration : _groundDamping; - var lerpTarget = _targetVelocity.magnitude > 0f ? _targetVelocity : Vector3.zero; - _actualVelocity = Vector3.Lerp(_actualVelocity, lerpTarget, lerpFactor * deltaTime); + var lerpRate = _targetVelocity.magnitude > 0f ? _acceleration : _groundDamping; + _currentVelocity = Vector3.Lerp(_currentVelocity, _targetVelocity, lerpRate * Time.deltaTime); - _currentVelocity = move.magnitude > 0f ? _targetVelocity : Vector3.zero; + if (look.magnitude > 0f) + { + _currentDirection = lookRotation * look; + } + else if (move.magnitude > 0f) + { + if (_facingDirectionMode == FacingDirectionMode.FaceMovementDirection) + { + _currentDirection = _targetVelocity; + } + else + { + _currentDirection = currentReferenceForward; + } + } + else + { + _currentDirection = currentReferenceForward; + } + } - // Direction represents where the character wants to face. - // When look input is active (right stick), use the look direction for turn-in-place. - // Otherwise, default to camera forward. - _currentDirection = look.magnitude > 0f - ? (referenceRotation * look).normalized - : referenceRotation * Vector3.forward; + private Quaternion GetDirectionRotation(Vector3 referenceForward) + { + if (_movementDirectionMode == MovementDirectionMode.Absolute) + { + return Quaternion.identity; + } + return Quaternion.LookRotation(referenceForward, Vector3.up); } #if USE_UNITY_INPUT_SYSTEM @@ -271,7 +336,13 @@ private void CalculateVelocityAndDirection() public void SetLookAction(InputActionReference lookAction) => _lookAction = lookAction; #endif - /// Sets the OVR camera rig used for input coordinate space. - public void SetCameraRig(OVRCameraRig cameraRig) => _cameraRig = cameraRig; + /// Sets the reference transform for input coordinate space. + public void SetReferenceTransform(Transform referenceTransform) => _referenceTransform = referenceTransform; + + /// Sets the movement direction mode. + public void SetMovementDirectionMode(MovementDirectionMode mode) => _movementDirectionMode = mode; + + /// Sets whether to lock direction at input start. + public void SetLockDirectionOnInputStart(bool locked) => _lockDirectionOnInputStart = locked; } } diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInput.cs.meta b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInput.cs.meta index 6eac5b8..fa4797f 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInput.cs.meta +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerJoystickInput.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 13f1ea40dce85ed428082d743c4f66fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 13f1ea40dce85ed428082d743c4f66fd \ No newline at end of file diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProvider.cs b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProvider.cs index 2b1b144..9cd4af4 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProvider.cs +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProvider.cs @@ -13,6 +13,8 @@ namespace Meta.XR.Movement.AI /// public class AIMotionSynthesizerSourceDataProvider : MonoBehaviour, ISourceDataProvider { + private const string BasePath = "Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/"; + [SerializeField] [Tooltip("JSON configuration file for the AIMotionSynthesizer skeleton data")] private TextAsset _config; @@ -41,25 +43,33 @@ public class AIMotionSynthesizerSourceDataProvider : MonoBehaviour, ISourceDataP [Tooltip("Manual direction (used when UseManualInput is true)")] private Vector3 _manualDirection = Vector3.forward; + [SerializeField] + [Tooltip("Apply root motion from the AI Motion Synthesizer to this transform")] + private bool _applyRootMotion; + + [SerializeField] + [Tooltip("Enable debug skeleton visualization")] + private bool _debugDrawSkeleton; + + [SerializeField] + [Tooltip("Color for debug skeleton visualization")] + private Color _debugSkeletonColor = Color.cyan; + private IAIMotionSynthesizerInputProvider _inputProviderCasted; private ulong _aiMotionSynthesizerHandle = MSDKAIMotionSynthesizer.INVALID_HANDLE; private NativeArray _currentPose; private NativeArray _tPose; + private NativeTransform _rootPose; private bool _isPoseValid; + private int[] _parentIndices; protected virtual void Awake() { _inputProviderCasted = _inputProvider as IAIMotionSynthesizerInputProvider; - if (!_config) + if (!_config || !_modelAsset) { - Debug.LogError("[AIMotionSynthesizerSourceDataProvider] Config asset is missing"); - return; - } - - if (!_modelAsset) - { - Debug.LogError("[AIMotionSynthesizerSourceDataProvider] Model asset is missing"); + Debug.LogError("[AIMotionSynthesizerSourceDataProvider] Config or Model asset is missing"); return; } @@ -72,16 +82,14 @@ protected virtual void Awake() if (!MSDKAIMotionSynthesizer.Initialize(_aiMotionSynthesizerHandle, _modelAsset.bytes, _guidanceAsset?.bytes)) { Debug.LogError("[AIMotionSynthesizerSourceDataProvider] Failed to initialize AIMotionSynthesizer"); - MSDKAIMotionSynthesizer.DestroyHandle(_aiMotionSynthesizerHandle); - _aiMotionSynthesizerHandle = MSDKAIMotionSynthesizer.INVALID_HANDLE; + CleanupHandle(); return; } if (!MSDKAIMotionSynthesizer.GetSkeletonInfo(_aiMotionSynthesizerHandle, SkeletonType.TargetSkeleton, out var info)) { Debug.LogError("[AIMotionSynthesizerSourceDataProvider] Failed to get skeleton info"); - MSDKAIMotionSynthesizer.DestroyHandle(_aiMotionSynthesizerHandle); - _aiMotionSynthesizerHandle = MSDKAIMotionSynthesizer.INVALID_HANDLE; + CleanupHandle(); return; } @@ -97,9 +105,6 @@ protected virtual void Update() return; } - // Use smoothDeltaTime for consistent timing across platforms. - // Raw deltaTime can vary significantly on Android due to thermal throttling, - // background processes, and variable refresh rates, causing pose jittering. var dt = Time.smoothDeltaTime; var velocity = _useManualInput ? _manualVelocity : (_inputProviderCasted?.GetVelocity() ?? Vector3.zero); var direction = _useManualInput ? _manualDirection : (_inputProviderCasted?.GetDirection() ?? Vector3.forward); @@ -122,9 +127,15 @@ protected virtual void OnDestroy() _tPose.Dispose(); } + CleanupHandle(); + } + + private void CleanupHandle() + { if (_aiMotionSynthesizerHandle != MSDKAIMotionSynthesizer.INVALID_HANDLE) { MSDKAIMotionSynthesizer.DestroyHandle(_aiMotionSynthesizerHandle); + _aiMotionSynthesizerHandle = MSDKAIMotionSynthesizer.INVALID_HANDLE; } } @@ -142,28 +153,30 @@ private void OnValidate() { AutoFindInputProvider(); } + AutoLoadDefaultAssets(); } private void AutoFindInputProvider() { - if (_inputProvider == null) + if (_inputProvider != null) { - var inputProviders = GetComponents(); - foreach (var component in inputProviders) + return; + } + + foreach (var component in GetComponents()) + { + if (component is IAIMotionSynthesizerInputProvider provider) { - if (component is IAIMotionSynthesizerInputProvider) - { - _inputProvider = component; - _inputProviderCasted = component as IAIMotionSynthesizerInputProvider; + _inputProvider = component; + _inputProviderCasted = provider; #if UNITY_EDITOR - if (!Application.isPlaying) - { - UnityEditor.EditorUtility.SetDirty(this); - } -#endif - break; + if (!Application.isPlaying) + { + UnityEditor.EditorUtility.SetDirty(this); } +#endif + break; } } } @@ -176,70 +189,79 @@ private void AutoLoadDefaultAssets() return; } - bool changed = false; + bool changed = TryLoadAsset(ref _config, BasePath + "AIMotionSynthesizerSkeletonData.json"); + changed |= TryLoadAsset(ref _modelAsset, BasePath + "AIMotionSynthesizerModel.bytes"); + changed |= TryLoadAsset(ref _guidanceAsset, BasePath + "AIMotionSynthesizerGuidance.bytes"); - if (_config == null) - { - _config = UnityEditor.AssetDatabase.LoadAssetAtPath("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerSkeletonData.json"); - if (_config != null) - { - changed = true; - } - } - - if (_modelAsset == null) + if (changed) { - _modelAsset = UnityEditor.AssetDatabase.LoadAssetAtPath("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerModel.bytes"); - if (_modelAsset != null) - { - changed = true; - } + UnityEditor.EditorUtility.SetDirty(this); } +#endif + } - if (_guidanceAsset == null) +#if UNITY_EDITOR + private static bool TryLoadAsset(ref TextAsset field, string path) + { + if (field != null) { - _guidanceAsset = UnityEditor.AssetDatabase.LoadAssetAtPath("Packages/com.meta.xr.sdk.movement/Runtime/Native/Data/AIMotionSynthesizerGuidance.bytes"); - if (_guidanceAsset != null) - { - changed = true; - } + return false; } - if (changed) - { - UnityEditor.EditorUtility.SetDirty(this); - } -#endif + field = UnityEditor.AssetDatabase.LoadAssetAtPath(path); + return field != null; } +#endif /// /// Gets the current AI motion synthesizer pose. /// - /// Native array of joint transforms in AI motion synthesizer skeleton order. public virtual NativeArray GetSkeletonPose() { - _isPoseValid = MSDKAIMotionSynthesizer.GetPoseByRef(_aiMotionSynthesizerHandle, ref _currentPose); + _isPoseValid = MSDKAIMotionSynthesizer.GetPoseByRef( + _aiMotionSynthesizerHandle, + ref _currentPose, + out _rootPose, + _applyRootMotion ? MSDKAIMotionSynthesizer.RootMotionMode.LocalSpace : MSDKAIMotionSynthesizer.RootMotionMode.None); + + if (_isPoseValid && _applyRootMotion) + { + transform.SetLocalPositionAndRotation(_rootPose.Position, _rootPose.Orientation); + } + + if (_debugDrawSkeleton && _currentPose is { IsCreated: true, Length: > 0 }) + { + DrawDebugSkeleton(); + } + return _currentPose; } - /// - /// Gets the T-pose for the AI motion synthesizer skeleton. - /// + private void DrawDebugSkeleton() + { + var jointCount = (int)SkeletonData.FullBodyTrackingBoneId.End; + if (_parentIndices == null || _parentIndices.Length != jointCount) + { + _parentIndices = new int[jointCount]; + for (int i = 0; i < jointCount; i++) + { + _parentIndices[i] = (int)SkeletonData.ParentBoneId[i]; + } + } + + MeshDraw.DrawSkeleton(_currentPose, _parentIndices, _debugSkeletonColor); + } + + /// Gets the T-pose for the AI motion synthesizer skeleton. public virtual NativeArray GetSkeletonTPose() => _tPose; - /// - /// Gets the manifestation string. Returns null for AI motion synthesizer. - /// + /// Gets the manifestation string. Returns null for AI motion synthesizer. public virtual string GetManifestation() => null; - /// - /// Whether the last pose retrieval succeeded. - /// + /// Whether the last pose retrieval succeeded. public virtual bool IsPoseValid() => _isPoseValid; - /// - /// Whether a new T-pose is available. Always false for AI motion synthesizer. - /// + /// Whether a new T-pose is available. Always false for AI motion synthesizer. public virtual bool IsNewTPoseAvailable() => false; } } diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProvider.cs.meta b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProvider.cs.meta index 7e6e605..c879531 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProvider.cs.meta +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/AIMotionSynthesizerSourceDataProvider.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 92b80bf6470c342419e5c4b5a8f91f23 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 92b80bf6470c342419e5c4b5a8f91f23 \ No newline at end of file diff --git a/Runtime/Native/Scripts/AIMotionSynthesizer/IAIMotionSynthesizerInputProvider.cs.meta b/Runtime/Native/Scripts/AIMotionSynthesizer/IAIMotionSynthesizerInputProvider.cs.meta index af1693d..dd0eda7 100644 --- a/Runtime/Native/Scripts/AIMotionSynthesizer/IAIMotionSynthesizerInputProvider.cs.meta +++ b/Runtime/Native/Scripts/AIMotionSynthesizer/IAIMotionSynthesizerInputProvider.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 89c6e575b3ad42b4ba7a2d2c05eb912c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 89c6e575b3ad42b4ba7a2d2c05eb912c \ No newline at end of file diff --git a/Runtime/Native/Scripts/MSDKAIMotionSynthesizer.cs b/Runtime/Native/Scripts/MSDKAIMotionSynthesizer.cs index 78dd404..9fb4cb6 100644 --- a/Runtime/Native/Scripts/MSDKAIMotionSynthesizer.cs +++ b/Runtime/Native/Scripts/MSDKAIMotionSynthesizer.cs @@ -39,6 +39,37 @@ public enum PoseSource AIMotionSynthesizer = 1 } + /// + /// Controls how root motion is extracted from the AI Motion Synthesizer pose. + /// Determines the coordinate space of outputPose relative to outputRootPose. + /// + public enum RootMotionMode + { + /// No root motion extraction. Root zeroed, hips retain position. + None = 0, + + /// Root extracted from hips, skeleton joints remain in world-origin-relative space. + WorldSpace = 1, + + /// + /// Root extracted from hips, skeleton joints transformed to root-relative space. + /// Use when applying root motion externally to prevent double-motion. + /// + LocalSpace = 2 + } + + /// + /// Which pose's root forward direction to align to during blending. + /// + public enum RootAlignmentDirection + { + /// Align blended result to body tracking root forward (user's actual facing direction). + BodyTracking = 0, + + /// Align blended result to AI Motion Synthesizer root forward (procedural animation direction). + AIMotionSynthesizer = 1 + } + private static LogCallback _aiMotionSynthesizerLogCallback = null; private static class AIMotionSynthesizerApi @@ -74,6 +105,12 @@ public static extern unsafe Result metaMovementSDK_initializeAIMotionSynthesizer byte* guidanceBytes, int guidanceBytesLength); + [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] + public static extern Result metaMovementSDK_getAIMotionSynthesizerSkeletonInfo( + ulong handle, + SkeletonType skeletonType, + out SkeletonInfo outSkeletonInfo); + [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] public static extern Result metaMovementSDK_processAIMotionSynthesizer( ulong handle, @@ -82,32 +119,25 @@ public static extern Result metaMovementSDK_processAIMotionSynthesizer( Vector3 velocity); [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] - public static extern unsafe Result metaMovementSDK_getAIMotionSynthesizerPose( - ulong handle, - NativeTransform* outputPose, - NativeTransform* outputRootPose); + public static extern Result metaMovementSDK_predictAIMotionSynthesizer(ulong handle, float deltaTime); [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] - public static extern unsafe Result metaMovementSDK_getAIMotionSynthesizerTPose( + public static extern unsafe Result metaMovementSDK_updateAIMotionSynthesizerTPose( ulong handle, - NativeTransform* outputTPose); + NativeTransform* targetTPose, + int numJoints); [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] - public static extern Result metaMovementSDK_getAIMotionSynthesizerSkeletonInfo( + public static extern unsafe Result metaMovementSDK_getAIMotionSynthesizerTPose( ulong handle, - SkeletonType skeletonType, - out SkeletonInfo outSkeletonInfo); - - [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] - public static extern Result metaMovementSDK_predictAIMotionSynthesizer(ulong handle, float deltaTime); + NativeTransform* outputTPose); [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] - public static extern unsafe Result metaMovementSDK_getSynthesizedAIMotionSynthesizerPose( + public static extern unsafe Result metaMovementSDK_getAIMotionSynthesizerPose( ulong handle, - NativeTransform* bodyTrackingPose, - float blendFactor, - NativeTransform* outputBlendedPose, - NativeTransform* outputRootPose); + NativeTransform* outputPose, + NativeTransform* outputRootPose, + RootMotionMode rootMotionMode); [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] public static extern unsafe Result metaMovementSDK_getBlendedAIMotionSynthesizerPose( @@ -115,15 +145,21 @@ public static extern unsafe Result metaMovementSDK_getBlendedAIMotionSynthesizer NativeTransform* bodyTrackingPose, PoseSource upperBodySource, PoseSource lowerBodySource, + RootAlignmentDirection rootAlignmentDirection, float blendFactor, + RootMotionMode rootMotionMode, NativeTransform* outputBlendedPose, NativeTransform* outputRootPose); [DllImport(AI_MOTION_SYNTHESIZER_DLL, CallingConvention = CallingConvention.Cdecl)] - public static extern unsafe Result metaMovementSDK_updateAIMotionSynthesizerTPose( + public static extern unsafe Result metaMovementSDK_getSynthesizedAIMotionSynthesizerPose( ulong handle, - NativeTransform* targetTPose, - int numJoints); + NativeTransform* bodyTrackingPose, + float blendFactor, + RootAlignmentDirection rootAlignmentDirection, + RootMotionMode rootMotionMode, + NativeTransform* outputBlendedPose, + NativeTransform* outputRootPose); } #region AIMotionSynthesizer Unity API @@ -322,6 +358,26 @@ public static bool Initialize( return success == Result.Success; } + /// + /// Gets skeleton information for the specified skeleton type from the AIMotionSynthesizer handle. + /// This retrieves basic information about the skeleton structure, including the number of joints and blendshapes. + /// Use this to understand the structure of a skeleton before performing operations on it. + /// + /// The AIMotionSynthesizer handle to get the skeleton info from. + /// The type of skeleton (source or target) to get info from. + /// Output parameter that receives the skeleton information. + /// True if the function was successfully executed. + public static bool GetSkeletonInfo(UInt64 handle, SkeletonType skeletonType, out SkeletonInfo skeletonInfo) + { + Result success; + using (new ProfilerScope(nameof(GetSkeletonInfo))) + { + success = AIMotionSynthesizerApi.metaMovementSDK_getAIMotionSynthesizerSkeletonInfo(handle, skeletonType, out skeletonInfo); + } + + return success == Result.Success; + } + /// /// Process the AIMotionSynthesizer with the given motion parameters. /// This method schedules tasks and services instances but does NOT run prediction. @@ -352,51 +408,89 @@ public static bool Process( } /// - /// Retrieves the current pose from the AIMotionSynthesizer system after processing. - /// Note: The output pose size must match the skeleton joint count from the AIMotionSynthesizer configuration. - /// This version allocates a temp NativeArray for the output. + /// Runs neural network prediction for all instances. + /// This method should be called at a fixed rate (e.g., 30Hz) independently from GetPose(). + /// It performs the neural network inference to generate future animation sequences. + /// - GetPose() is called every frame to service instances + /// - Predict() is called at a fixed rate (e.g., 30Hz) to run inference /// - /// The handle to use for retrieving the pose. - /// The output array to write pose data to. - /// The number of joints expected in the output pose. - /// True if retrieval was successful, false otherwise. - public static bool GetPose( + /// The handle to use for prediction. + /// The time delta between frames in seconds. + /// True if prediction was successful, false otherwise. + public static bool Predict(UInt64 handle, float deltaTime) + { + Result success; + using (new ProfilerScope(nameof(Predict))) + { + success = AIMotionSynthesizerApi.metaMovementSDK_predictAIMotionSynthesizer(handle, deltaTime); + } + + return success == Result.Success; + } + + /// + /// Update the source reference T-pose scale for the AIMotionSynthesizer retargeting. + /// + /// This function compares the passed-in body tracking T-pose with the source T-pose + /// to calculate a scaling factor, then stores it for use during pose retargeting and blending. + /// + /// To prevent jittering from inconsistent pose lengths, only call this function when: + /// - Initializing the AIMotionSynthesizer (scale starts at 1.0) + /// - When the body tracking T-pose actually changes + /// + /// Do NOT call this function every frame, as varying pose lengths can cause jittering. + /// + /// The AIMotionSynthesizer handle. + /// Body tracking T-pose transforms to calculate scale from. + /// True if the update was successful, false otherwise. + public static bool UpdateTPose( UInt64 handle, - out NativeArray outputPose, - int jointCount) + NativeArray targetTPose) { + if (!targetTPose.IsCreated) + { + Debug.LogError("[MSDKAIMotionSynthesizer] UpdateTPose: targetTPose must be created"); + return false; + } + Result success; - using (new ProfilerScope(nameof(GetPose))) + using (new ProfilerScope(nameof(UpdateTPose))) { unsafe { - outputPose = new NativeArray(jointCount, Allocator.Temp, NativeArrayOptions.UninitializedMemory); - success = AIMotionSynthesizerApi.metaMovementSDK_getAIMotionSynthesizerPose( + success = AIMotionSynthesizerApi.metaMovementSDK_updateAIMotionSynthesizerTPose( handle, - outputPose.GetPtr(), - null); + targetTPose.GetPtr(), + targetTPose.Length); } } + if (success != Result.Success) + { + Debug.LogError($"[MSDKAIMotionSynthesizer] UpdateTPose failed with result: {success}"); + } + return success == Result.Success; } /// - /// Retrieves the current pose from the AIMotionSynthesizer system after processing, including the root pose. + /// Retrieves the current pose with configurable root motion handling. /// The root pose contains XZ translation and yaw rotation extracted from the hips joint. /// Note: The output pose size must match the skeleton joint count from the AIMotionSynthesizer configuration. /// This version allocates a temp NativeArray for the output. /// /// The handle to use for retrieving the pose. - /// The output array to write pose data to (root joint will be zeroed). + /// The output array to write pose data to. /// The extracted root pose (XZ translation + yaw rotation). /// The number of joints expected in the output pose. + /// Controls how root motion is extracted and how skeleton joints are transformed. /// True if retrieval was successful, false otherwise. public static bool GetPose( UInt64 handle, out NativeArray outputPose, out NativeTransform outputRootPose, - int jointCount) + int jointCount, + RootMotionMode rootMotionMode) { Result success; using (new ProfilerScope(nameof(GetPose))) @@ -409,7 +503,8 @@ public static bool GetPose( success = AIMotionSynthesizerApi.metaMovementSDK_getAIMotionSynthesizerPose( handle, outputPose.GetPtr(), - rootPosePtr); + rootPosePtr, + rootMotionMode); } } } @@ -418,44 +513,20 @@ public static bool GetPose( } /// - /// Retrieves the current pose from the AIMotionSynthesizer system after processing. - /// This version uses a pre-allocated persistent NativeArray. - /// - /// The handle to use for retrieving the pose. - /// The pre-allocated output array to write pose data to. - /// True if retrieval was successful, false otherwise. - public static bool GetPoseByRef( - UInt64 handle, - ref NativeArray outputPose) - { - Result success; - using (new ProfilerScope(nameof(GetPoseByRef))) - { - unsafe - { - success = AIMotionSynthesizerApi.metaMovementSDK_getAIMotionSynthesizerPose( - handle, - outputPose.GetPtr(), - null); - } - } - - return success == Result.Success; - } - - /// - /// Retrieves the current pose from the AIMotionSynthesizer system after processing, including the root pose. + /// Retrieves the current pose with configurable root motion handling. /// The root pose contains XZ translation and yaw rotation extracted from the hips joint. /// This version uses a pre-allocated persistent NativeArray. /// /// The handle to use for retrieving the pose. - /// The pre-allocated output array to write pose data to (root joint will be zeroed). + /// The pre-allocated output array to write pose data to. /// The extracted root pose (XZ translation + yaw rotation). + /// Controls how root motion is extracted and how skeleton joints are transformed. /// True if retrieval was successful, false otherwise. public static bool GetPoseByRef( UInt64 handle, ref NativeArray outputPose, - out NativeTransform outputRootPose) + out NativeTransform outputRootPose, + RootMotionMode rootMotionMode) { Result success; using (new ProfilerScope(nameof(GetPoseByRef))) @@ -467,7 +538,8 @@ public static bool GetPoseByRef( success = AIMotionSynthesizerApi.metaMovementSDK_getAIMotionSynthesizerPose( handle, outputPose.GetPtr(), - rootPosePtr); + rootPosePtr, + rootMotionMode); } } } @@ -531,47 +603,6 @@ public static bool GetTPoseByRef( return success == Result.Success; } - /// - /// Gets skeleton information for the specified skeleton type from the AIMotionSynthesizer handle. - /// This retrieves basic information about the skeleton structure, including the number of joints and blendshapes. - /// Use this to understand the structure of a skeleton before performing operations on it. - /// - /// The AIMotionSynthesizer handle to get the skeleton info from. - /// The type of skeleton (source or target) to get info from. - /// Output parameter that receives the skeleton information. - /// True if the function was successfully executed. - public static bool GetSkeletonInfo(UInt64 handle, SkeletonType skeletonType, out SkeletonInfo skeletonInfo) - { - Result success; - using (new ProfilerScope(nameof(GetSkeletonInfo))) - { - success = AIMotionSynthesizerApi.metaMovementSDK_getAIMotionSynthesizerSkeletonInfo(handle, skeletonType, out skeletonInfo); - } - - return success == Result.Success; - } - - /// - /// Runs neural network prediction for all instances. - /// This method should be called at a fixed rate (e.g., 30Hz) independently from GetPose(). - /// It performs the neural network inference to generate future animation sequences. - /// - GetPose() is called every frame to service instances - /// - Predict() is called at a fixed rate (e.g., 30Hz) to run inference - /// - /// The handle to use for prediction. - /// The time delta between frames in seconds. - /// True if prediction was successful, false otherwise. - public static bool Predict(UInt64 handle, float deltaTime) - { - Result success; - using (new ProfilerScope(nameof(Predict))) - { - success = AIMotionSynthesizerApi.metaMovementSDK_predictAIMotionSynthesizer(handle, deltaTime); - } - - return success == Result.Success; - } - /// /// Get a synthesized pose that blends between body tracking and AIMotionSynthesizer for upper body, /// while always using AIMotionSynthesizer for lower body. @@ -588,13 +619,17 @@ public static bool Predict(UInt64 handle, float deltaTime) /// The AIMotionSynthesizer handle to use for blending. /// Input body tracking pose. /// Blend factor controlling upper body source (0.0 = body tracking upper, 1.0 = AIMotionSynthesizer upper). + /// Which pose's forward direction to align to during blending. + /// Controls how root motion is extracted and how skeleton joints are transformed. /// Output synthesized pose (will be allocated if not already created). /// Output root pose (extracted from AIMotionSynthesizer). /// True if synthesis was successful, false otherwise. - public static bool GetSynthesizedAIMotionSynthesizerPose( + public static bool GetSynthesizedPose( UInt64 handle, NativeArray bodyTrackingPose, float blendFactor, + RootAlignmentDirection rootAlignmentDirection, + RootMotionMode rootMotionMode, out NativeArray outputBlendedPose, out NativeTransform outputRootPose) { @@ -610,7 +645,7 @@ public static bool GetSynthesizedAIMotionSynthesizerPose( outputBlendedPose = new NativeArray(jointCount, Allocator.Temp, NativeArrayOptions.UninitializedMemory); Result success; - using (new ProfilerScope(nameof(GetSynthesizedAIMotionSynthesizerPose))) + using (new ProfilerScope(nameof(GetSynthesizedPose))) { unsafe { @@ -620,6 +655,8 @@ public static bool GetSynthesizedAIMotionSynthesizerPose( handle, bodyTrackingPose.GetPtr(), blendFactor, + rootAlignmentDirection, + rootMotionMode, outputBlendedPose.GetPtr(), rootPosePtr); } @@ -647,13 +684,17 @@ public static bool GetSynthesizedAIMotionSynthesizerPose( /// The AIMotionSynthesizer handle to use for blending. /// Input body tracking pose. /// Blend factor controlling upper body source (0.0 = body tracking upper, 1.0 = AIMotionSynthesizer upper). + /// Which pose's forward direction to align to during blending. + /// Controls how root motion is extracted and how skeleton joints are transformed. /// Output synthesized pose (pre-allocated). /// Output root pose (extracted from AIMotionSynthesizer). /// True if synthesis was successful, false otherwise. - public static bool GetSynthesizedAIMotionSynthesizerPoseByRef( + public static bool GetSynthesizedPoseByRef( UInt64 handle, NativeArray bodyTrackingPose, float blendFactor, + RootAlignmentDirection rootAlignmentDirection, + RootMotionMode rootMotionMode, ref NativeArray outputBlendedPose, out NativeTransform outputRootPose) { @@ -677,7 +718,7 @@ public static bool GetSynthesizedAIMotionSynthesizerPoseByRef( } Result success; - using (new ProfilerScope(nameof(GetSynthesizedAIMotionSynthesizerPose))) + using (new ProfilerScope(nameof(GetSynthesizedPose))) { unsafe { @@ -687,6 +728,8 @@ public static bool GetSynthesizedAIMotionSynthesizerPoseByRef( handle, bodyTrackingPose.GetPtr(), blendFactor, + rootAlignmentDirection, + rootMotionMode, outputBlendedPose.GetPtr(), rootPosePtr); } @@ -703,23 +746,33 @@ public static bool GetSynthesizedAIMotionSynthesizerPoseByRef( /// /// Blend body tracking and AIMotionSynthesizer poses based on upper/lower body options. - /// This function aligns the AIMotionSynthesizer pose to the body tracking pose by the hips, - /// then blends between the two poses based on the blend factor and body region settings. + /// This function aligns the poses based on the specified root alignment direction before blending. + /// When aligning to body tracking, the AIMotionSynthesizer pose is rotated to match the body tracking forward. + /// When aligning to AIMotionSynthesizer, the body tracking pose is rotated to match the AIMotionSynthesizer forward. + /// + /// Special cases for homogeneous sources: + /// - When both sources are AIMotionSynthesizer: Output is identical to GetPose with the specified rootMotionMode + /// - When both sources are BodyTracking: Root motion is extracted from body tracking pose + /// and the skeleton is optionally transformed to local space based on rootMotionMode /// /// The AIMotionSynthesizer handle to use for blending. /// Input body tracking pose. /// Which pose to use for upper body (spine and above). /// Which pose to use for lower body (hips and legs). + /// Which pose's forward direction to align to during blending. /// Blend factor (0.0 = body tracking only, 1.0 = use upper/lower body options). + /// Controls how root motion is extracted and how skeleton joints are transformed. /// Output blended pose (will be allocated if not already created). - /// Output root pose (extracted from AIMotionSynthesizer). + /// Output root pose (extracted based on alignment direction and sources). /// True if blending was successful, false otherwise. - public static bool GetBlendedAIMotionSynthesizerPose( + public static bool GetBlendedPose( UInt64 handle, NativeArray bodyTrackingPose, PoseSource upperBodySource, PoseSource lowerBodySource, + RootAlignmentDirection rootAlignmentDirection, float blendFactor, + RootMotionMode rootMotionMode, out NativeArray outputBlendedPose, out NativeTransform outputRootPose) { @@ -735,7 +788,7 @@ public static bool GetBlendedAIMotionSynthesizerPose( outputBlendedPose = new NativeArray(jointCount, Allocator.Temp, NativeArrayOptions.UninitializedMemory); Result success; - using (new ProfilerScope(nameof(GetBlendedAIMotionSynthesizerPose))) + using (new ProfilerScope(nameof(GetBlendedPose))) { unsafe { @@ -746,7 +799,9 @@ public static bool GetBlendedAIMotionSynthesizerPose( bodyTrackingPose.GetPtr(), upperBodySource, lowerBodySource, + rootAlignmentDirection, blendFactor, + rootMotionMode, outputBlendedPose.GetPtr(), rootPosePtr); } @@ -763,24 +818,34 @@ public static bool GetBlendedAIMotionSynthesizerPose( /// /// Blend body tracking and AIMotionSynthesizer poses based on upper/lower body options. - /// This function aligns the AIMotionSynthesizer pose to the body tracking pose by the hips, - /// then blends between the two poses based on the blend factor and body region settings. + /// This function aligns the poses based on the specified root alignment direction before blending. + /// When aligning to body tracking, the AIMotionSynthesizer pose is rotated to match the body tracking forward. + /// When aligning to AIMotionSynthesizer, the body tracking pose is rotated to match the AIMotionSynthesizer forward. /// This version uses pre-allocated persistent NativeArrays. + /// + /// Special cases for homogeneous sources: + /// - When both sources are AIMotionSynthesizer: Output is identical to GetPose with the specified rootMotionMode + /// - When both sources are BodyTracking: Root motion is extracted from body tracking pose + /// and the skeleton is optionally transformed to local space based on rootMotionMode /// /// The AIMotionSynthesizer handle to use for blending. /// Input body tracking pose. /// Which pose to use for upper body (spine and above). /// Which pose to use for lower body (hips and legs). + /// Which pose's forward direction to align to during blending. /// Blend factor (0.0 = body tracking only, 1.0 = use upper/lower body options). + /// Controls how root motion is extracted and how skeleton joints are transformed. /// Output blended pose (pre-allocated). - /// Output root pose (extracted from AIMotionSynthesizer). + /// Output root pose (extracted based on alignment direction and sources). /// True if blending was successful, false otherwise. - public static bool GetBlendedAIMotionSynthesizerPoseByRef( + public static bool GetBlendedPoseByRef( UInt64 handle, NativeArray bodyTrackingPose, PoseSource upperBodySource, PoseSource lowerBodySource, + RootAlignmentDirection rootAlignmentDirection, float blendFactor, + RootMotionMode rootMotionMode, ref NativeArray outputBlendedPose, out NativeTransform outputRootPose) { @@ -804,7 +869,7 @@ public static bool GetBlendedAIMotionSynthesizerPoseByRef( } Result success; - using (new ProfilerScope(nameof(GetBlendedAIMotionSynthesizerPose))) + using (new ProfilerScope(nameof(GetBlendedPose))) { unsafe { @@ -815,7 +880,9 @@ public static bool GetBlendedAIMotionSynthesizerPoseByRef( bodyTrackingPose.GetPtr(), upperBodySource, lowerBodySource, + rootAlignmentDirection, blendFactor, + rootMotionMode, outputBlendedPose.GetPtr(), rootPosePtr); } @@ -829,51 +896,6 @@ public static bool GetBlendedAIMotionSynthesizerPoseByRef( return success == Result.Success; } - - /// - /// Update the source reference T-pose scale for the AIMotionSynthesizer retargeting. - /// - /// This function compares the passed-in body tracking T-pose with the source T-pose - /// to calculate a scaling factor, then stores it for use during pose retargeting and blending. - /// - /// To prevent jittering from inconsistent pose lengths, only call this function when: - /// - Initializing the AIMotionSynthesizer (scale starts at 1.0) - /// - When the body tracking T-pose actually changes - /// - /// Do NOT call this function every frame, as varying pose lengths can cause jittering. - /// - /// The AIMotionSynthesizer handle. - /// Body tracking T-pose transforms to calculate scale from. - /// True if the update was successful, false otherwise. - public static bool UpdateTPose( - UInt64 handle, - NativeArray targetTPose) - { - if (!targetTPose.IsCreated) - { - Debug.LogError("[MSDKAIMotionSynthesizer] UpdateTPose: targetTPose must be created"); - return false; - } - - Result success; - using (new ProfilerScope(nameof(UpdateTPose))) - { - unsafe - { - success = AIMotionSynthesizerApi.metaMovementSDK_updateAIMotionSynthesizerTPose( - handle, - targetTPose.GetPtr(), - targetTPose.Length); - } - } - - if (success != Result.Success) - { - Debug.LogError($"[MSDKAIMotionSynthesizer] UpdateTPose failed with result: {success}"); - } - - return success == Result.Success; - } #endregion } } diff --git a/Runtime/Native/Scripts/MSDKAIMotionSynthesizer.cs.meta b/Runtime/Native/Scripts/MSDKAIMotionSynthesizer.cs.meta index 8810e26..dac3207 100644 --- a/Runtime/Native/Scripts/MSDKAIMotionSynthesizer.cs.meta +++ b/Runtime/Native/Scripts/MSDKAIMotionSynthesizer.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 8bbfd14aaeaddf1489a6392b5fee53e3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 8bbfd14aaeaddf1489a6392b5fee53e3 \ No newline at end of file diff --git a/Runtime/Native/Scripts/MSDKUtility.cs b/Runtime/Native/Scripts/MSDKUtility.cs index 21a18b9..f6f3a48 100644 --- a/Runtime/Native/Scripts/MSDKUtility.cs +++ b/Runtime/Native/Scripts/MSDKUtility.cs @@ -158,7 +158,7 @@ public static bool FreeUnmanagedStringArray(ref IntPtr unmanagedStringArray, int /// public const int SERIALIZATION_END_HEADER_SIZE_BYTES = 8; - public const double SERIALIZATION_VERSION_CURRENT = 0.03; + public const double SERIALIZATION_VERSION_CURRENT = 0.04; /// /// Static DLL name. @@ -758,6 +758,11 @@ public struct SkeletonInfo /// public SkeletonType Type; + /// + /// Flags set on the skeleton. + /// + public SkeletonFlags Flags; + /// /// The number of joints. /// @@ -774,9 +779,10 @@ public struct SkeletonInfo /// /// /// - public SkeletonInfo(SkeletonType type, int jointCount, int blendShapeCount) + public SkeletonInfo(SkeletonType type, SkeletonFlags flags, int jointCount, int blendShapeCount) { Type = type; + Flags = flags; JointCount = jointCount; BlendShapeCount = blendShapeCount; } @@ -788,6 +794,7 @@ public SkeletonInfo(SkeletonType type, int jointCount, int blendShapeCount) public override string ToString() { return $"SkeletonType({Type}) " + + $"Flags({Flags}) " + $"JointCount({JointCount}) " + $"BlendShapeCount({BlendShapeCount})"; } @@ -1331,6 +1338,28 @@ public bool ApproximatelyEquals(CoordinateSpace other, float tolerance = 0.0001f } } + /// + /// Flags that specify information or behavior about a skeleton + /// + [Flags] + public enum SkeletonFlags : uint + { + /// + /// No flags applied to this skeleton. + /// + None = 0, + + /// + /// When set, the coordinate conversion process will not apply + /// any rotation correction to the joint orientations. + /// The Movement SDK Skeleton requires this flag to be set for + /// X-Engine compatibility. + /// NOTE: The rotation is applied (and required) for most model + /// formats (FBX, GLTF, OBJ, etc.) + /// + NoRotationCorrectionOnCoordConversion = 1 << 0, + } + /// /// Contains Initialization Parameters for a Skeleton /// @@ -1342,6 +1371,11 @@ public struct SkeletonInitParams public NativeArray MinTPose; public NativeArray MaxTPose; public NativeArray UnscaledTPose; + + // NOTE: All 3 poses need to be in the same joint space type + // Root Relative by default. + public JointRelativeSpaceType JointSpaceType; + public string[] OptionalKnownSourceJointNamesById; public AutoMappingJointData[] OptionalAutoMapJointData; @@ -1354,6 +1388,9 @@ public struct SkeletonInitParams // Buffer of all Manifestation joint names in order of manifestations public string[] OptionalManifestationJointNames; + // Skeleton Flags + public SkeletonFlags SkeletonFlags; + public override string ToString() { var sb = new System.Text.StringBuilder(); @@ -1365,9 +1402,11 @@ public override string ToString() sb.AppendLine($" MinTPose: {MinTPose.Length}"); sb.AppendLine($" MaxTPose: {MaxTPose.Length}"); sb.AppendLine($" UnscaledTPose: {UnscaledTPose.Length}"); + sb.AppendLine($" JointSpaceType: {JointSpaceType}"); sb.AppendLine($" OptionalKnownSourceJointNamesById: {OptionalKnownSourceJointNamesById?.Length ?? 0}"); sb.AppendLine($" OptionalAutoMapJointData: {OptionalAutoMapJointData?.Length ?? 0}"); sb.AppendLine($" Manifestations: {OptionalManifestationNames?.Length ?? 0}"); + sb.AppendLine($" SkeletonFlags: {SkeletonFlags}"); // Add joint names if (JointNames is { Length: > 0 }) @@ -1420,6 +1459,10 @@ private struct SkeletonInitParamsUnmanaged : IDisposable public unsafe NativeTransform* MaxTPose; public unsafe NativeTransform* UnscaledTPose; + // NOTE: All 3 poses need to be in the same joint space type + // Root Relative by default. + public JointRelativeSpaceType JointSpaceType; + public IntPtr optional_KnownSourceJointNamesById; public int optional_autoMapJointDataCount; @@ -1437,6 +1480,9 @@ private struct SkeletonInitParamsUnmanaged : IDisposable // Buffer of all Manifestation joint names in order of manifestations public IntPtr optional_ManifestationJointNames; + // Skeleton Flags + public SkeletonFlags SkeletonFlags; + public unsafe SkeletonInitParamsUnmanaged(SkeletonInitParams safeParams) { BlendShapeCount = safeParams.BlendShapeNames?.Length ?? 0; @@ -1449,6 +1495,9 @@ public unsafe SkeletonInitParamsUnmanaged(SkeletonInitParams safeParams) MinTPose = safeParams.MinTPose.IsCreated ? safeParams.MinTPose.GetPtr() : null; MaxTPose = safeParams.MaxTPose.IsCreated ? safeParams.MaxTPose.GetPtr() : null; UnscaledTPose = safeParams.UnscaledTPose.IsCreated ? safeParams.UnscaledTPose.GetPtr() : null; + + JointSpaceType = safeParams.JointSpaceType; + optional_KnownSourceJointNamesById = UnmanagedMarshalFunctions.MarshalStringArrayToUnmanagedPtr(safeParams .OptionalKnownSourceJointNamesById); @@ -1489,6 +1538,8 @@ public unsafe SkeletonInitParamsUnmanaged(SkeletonInitParams safeParams) optional_ManifestationJointNames = UnmanagedMarshalFunctions.MarshalStringArrayToUnmanagedPtr(safeParams .OptionalManifestationJointNames); + + SkeletonFlags = safeParams.SkeletonFlags; } public unsafe void Dispose() @@ -1659,6 +1710,68 @@ public SnapshotData( } } + /// + /// Managed struct containing data for deserialization operations. + /// This struct is used to pass input arrays and receive output values from the deserialization function. + /// + public struct DeserializedSnapshotData + { + /// + /// Input: The version of the serialized data format. + /// + public double DataVersion; + + /// + /// Target skeleton pose native array (output for retargeted body pose). + /// + public NativeArray TargetSkeletonPose; + + /// + /// Face pose native array (output for face blendshape weights). + /// + public NativeArray FacePose; + + /// + /// Source skeleton pose native array (output for body tracking pose). + /// + public NativeArray SourceSkeletonPose; + + /// + /// Bind pose native array. + /// + public NativeArray BindPose; + + /// + /// Output: Timestamp of the deserialized snapshot. + /// + public double Timestamp; + + /// + /// Output: Compression type used in the snapshot. + /// + public SerializationCompressionType CompressionType; + + /// + /// Output: Acknowledgement number from the snapshot. + /// + public int Ack; + + /// + /// Output: Frame data containing metadata about the frame. + /// + public FrameData FrameData; + + /// + /// Output: Number of bind pose joints deserialized. + /// + public int NumBindPoseJoints; + + /// + /// Output: Coordinate space of the recording source. + /// + public CoordinateSpace CoordinateSpaceSource; + } + /// /// Unmanaged snapshot data. /// @@ -1783,6 +1896,26 @@ private struct DeserializedSnapshotDataUnmanaged public unsafe NativeTransform* BindPose; public int NumBindPoseJoints; public CoordinateSpace CoordinateSpaceSource; + + /// + /// Constructor that initializes the unmanaged struct from the managed DeserializedSnapshotData. + /// + /// The managed snapshot data containing output arrays. + public unsafe DeserializedSnapshotDataUnmanaged(DeserializedSnapshotData snapshotData) + { + Timestamp = 0; + Compression = SerializationCompressionType.High; + Ack = 0; + + TargetSkeletonPose = snapshotData.TargetSkeletonPose.IsCreated ? snapshotData.TargetSkeletonPose.GetPtr() : null; + FacePose = snapshotData.FacePose.IsCreated ? snapshotData.FacePose.GetPtr() : null; + SourceSkeletonPose = snapshotData.SourceSkeletonPose.IsCreated ? snapshotData.SourceSkeletonPose.GetPtr() : null; + BindPose = snapshotData.BindPose.IsCreated ? snapshotData.BindPose.GetPtr() : null; + + FrameData = new FrameData(); + NumBindPoseJoints = 0; + CoordinateSpaceSource = new CoordinateSpace(); + } } /// @@ -2262,6 +2395,9 @@ private static class Api [DllImport(DLL, CallingConvention = CallingConvention.Cdecl)] public static extern Result metaMovementSDK_destroy(ulong handle); + [DllImport(DLL, CallingConvention = CallingConvention.Cdecl)] + public static extern Result metaMovementSDK_destroyAllHandles(); + [DllImport(DLL, CallingConvention = CallingConvention.Cdecl)] public static extern Result metaMovementSDK_createOrUpdateSimpleUtilityConfig( string configName, @@ -2275,6 +2411,14 @@ public static extern Result metaMovementSDK_createOrUpdateUtilityConfig( ref ConfigInitParamsUnmanaged initParamsUnmanaged, out ulong handle); + // NOTE: sourceHandle and in_out_handle can be the same. The result will + // be that the reversed mapping replaces the source mapping. + [DllImport(DLL, CallingConvention = CallingConvention.Cdecl)] + public static extern Result metaMovementSDK_createReverseMappingUtilityConfig( + string configName, + ulong sourceHandle, + out ulong handle); + /********************************************************** * * Query Functions @@ -2714,6 +2858,7 @@ public static extern unsafe Result metaMovementSDK_writeConfigDataToJSON( public static extern unsafe Result metaMovementSDK_applyWorldSpaceCoordinateSpaceConversion( CoordinateSpace inCoordinateSpace, CoordinateSpace outCoordinateSpace, + bool applyFBXandGLBModelFileJointRotationFixup, NativeTransform* transformData, int jointCount); @@ -2926,6 +3071,29 @@ public static bool CreateOrUpdateUtilityConfig(string configName, ConfigInitPara return wasSuccesful; } + /// + /// Creates a reverse mapping of the config specified at sourceHandle and returns the new handle for the reversed config + /// This creates a retargeting config used to convert animation data back from the target skeleton to the source skeleton. + /// + /// The name of the reversed config. + /// Source handle for the config to reverse. + /// The handle that can be used for accessing the resulting config. (Can be the same as sourceHandle) + /// True if the function was successfully executed. + public static bool CreateReverseMappingUtilityConfig(string configName, ulong sourceHandle, out ulong handle) + { + Result success; + using (new ProfilerScope(nameof(CreateReverseMappingUtilityConfig))) + { + + success = Api.metaMovementSDK_createReverseMappingUtilityConfig( + configName, + sourceHandle, + out handle); + + } + return success == Result.Success; + } + /// /// Creates or updates a handle using a config string. /// This method allows for creating a configuration from a JSON string rather than @@ -2968,6 +3136,23 @@ public static bool DestroyHandle(ulong handle) return success == Result.Success; } + /// + /// Destroy all handles that are currently loaded. + /// This releases all resources associated with the loaded handles + /// Useful for Tooling and cleanup when switching level. + /// + /// True if the function was successfully executed. + public static bool DestroyAllHandles() + { + Result success; + using (new ProfilerScope(nameof(DestroyAllHandles))) + { + success = Api.metaMovementSDK_destroyAllHandles(); + } + + return success == Result.Success; + } + /********************************************************** * * Query Functions @@ -4443,50 +4628,16 @@ public static bool SetSerializationSettings(ulong handle, SerializationSettings /// The serialization applies compression based on the current serialization settings. /// /// The handle to use for serialization. - /// The timestamp to associate with this snapshot, in seconds. - /// The body pose transforms to be serialized. - /// The face pose blendshape weights to be serialized normalized. - /// The acknowledgement number for the data, used for synchronization. - /// The indices of the joints in the body pose that should be serialized. - /// The indices of the blendshapes in the face pose that should be serialized. + /// The snapshot data containing body pose, face pose, and other serialization parameters. /// Reference to a byte array that will be created and filled with the serialized data. /// True if serialization was successful. public static bool SerializeSkeletonAndFace( ulong handle, - float timestamp, - NativeArray bodyPose, - NativeArray facePose, - int ack, - int[] bodyIndicesToSerialize, - int[] faceIndicesToSerialize, + SnapshotData snapshotData, ref NativeArray output) { using (new ProfilerScope(nameof(SerializeSkeletonAndFace))) { - var bodyIndices = new NativeArray(bodyIndicesToSerialize.Length, Allocator.Temp, - NativeArrayOptions.UninitializedMemory); - var faceIndices = new NativeArray(faceIndicesToSerialize.Length, Allocator.Temp, - NativeArrayOptions.UninitializedMemory); - bodyIndices.CopyFrom(bodyIndicesToSerialize); - faceIndices.CopyFrom(faceIndicesToSerialize); - - SnapshotData snapshotData = new SnapshotData(); - snapshotData.BaselineAck = ack; - snapshotData.Timestamp = timestamp; - - snapshotData.TargetSkeletonPose = bodyPose; - snapshotData.TargetSkeletonIndices = bodyIndices; - - snapshotData.FacePose = facePose; - snapshotData.FaceIndices = faceIndices; - - // Unity coordinate system: Y-up, Z-forward (positive), X-right - snapshotData.RecordingCoordinateSpaceSource = new CoordinateSpace( - up: new Vector3(0.0f, 1.0f, 0.0f), - forward: new Vector3(0.0f, 0.0f, 1.0f), - right: new Vector3(1.0f, 0.0f, 0.0f), - metersToUnitScale: 1.0f); - if (!BuildSnapshot(handle, snapshotData)) { Debug.LogError("Could not build snapshot before serialization!"); @@ -4551,29 +4702,16 @@ public static bool BuildSnapshot( /// Useful when you don't need to serialize facial expressions. /// /// The handle associated with the serialization. - /// The timestamp to associate with this snapshot, in seconds. - /// The acknowledgment index of the data, used for synchronization. - /// The body pose transforms to serialize. - /// The indices of the joints in the body pose that should be serialized. + /// The snapshot data containing body pose and other serialization parameters. /// Reference to a byte array that will be created and filled with the serialized data. /// True if serialization was successful. public static bool SerializeBodySkeleton( ulong handle, - float timestamp, - int ack, - NativeArray bodyTrackingPose, - NativeArray bodyTrackingIndices, + SnapshotData snapshotData, ref NativeArray output) { using (new ProfilerScope(nameof(SerializeBodySkeleton))) { - SnapshotData snapshotData = new SnapshotData(); - snapshotData.BaselineAck = ack; - snapshotData.Timestamp = timestamp; - - snapshotData.SourceSkeletonPose = bodyTrackingPose; - snapshotData.SourceSkeletonIndices = bodyTrackingIndices; - if (!BuildSnapshot(handle, snapshotData)) { Debug.LogError("Could not build snapshot before serialization!"); @@ -4609,95 +4747,29 @@ public static bool SerializeBodySkeleton( /// /// The handle to use for deserialization. /// The serialized data to be deserialized. - /// Output parameter that receives the timestamp of the snapshot. - /// Output parameter that receives the compression type used in the snapshot. - /// Output parameter that receives the acknowledgement number from the snapshot. - /// Reference to an array that will be filled with the deserialized body pose transforms. - /// Reference to an array that will be filled with the deserialized face pose blendshape weights. + /// The struct containing input parameters (including DataVersion) and receiving output values. /// True if deserialization was successful. public static bool DeserializeSkeletonAndFace( ulong handle, NativeArray data, - double dataVersion, - out double timestamp, - out SerializationCompressionType compressionType, - out int ack, - ref NativeArray outputBodyPose, - ref NativeArray outputFacePose) + ref DeserializedSnapshotData deserializedSnapshotData) { Result success; using (new ProfilerScope(nameof(DeserializeSkeletonAndFace))) { unsafe { - DeserializedSnapshotDataUnmanaged snapshotDataUnmanaged = new DeserializedSnapshotDataUnmanaged(); - snapshotDataUnmanaged.SourceSkeletonPose = null; - snapshotDataUnmanaged.TargetSkeletonPose = outputBodyPose.GetPtr(); - snapshotDataUnmanaged.FacePose = outputFacePose.GetPtr(); - snapshotDataUnmanaged.BindPose = null; + var snapshotDataUnmanaged = new DeserializedSnapshotDataUnmanaged(deserializedSnapshotData); - success = Api.metaMovementSDK_deserializeSnapshotData(handle, data.GetPtr(), dataVersion, + success = Api.metaMovementSDK_deserializeSnapshotData(handle, data.GetPtr(), deserializedSnapshotData.DataVersion, ref snapshotDataUnmanaged); - timestamp = snapshotDataUnmanaged.Timestamp; - compressionType = snapshotDataUnmanaged.Compression; - ack = snapshotDataUnmanaged.Ack; - } - } - return success == Result.Success; - } - - /// - /// Deserializes data into body and face pose data with additional tracking information. - /// This extended version also extracts body tracking pose and frame metadata from the snapshot. - /// - /// The handle to use for deserialization. - /// The serialized data to be deserialized. - /// Output parameter that receives the timestamp of the snapshot. - /// Output parameter that receives the compression type used in the snapshot. - /// Output parameter that receives the acknowledgement number from the snapshot. - /// Reference to an array that will be filled with the deserialized body pose transforms. - /// Reference to an array that will be filled with the deserialized face pose blendshape weights. - /// Reference to an array that will be filled with the deserialized body tracking pose transforms. - /// Reference to a FrameData structure that will be filled with metadata about the frame. - /// Output bind pose. - /// Output bind pose count. - /// Coordinate space (source). - /// True if deserialization was successful. - public static bool DeserializeSkeletonAndFace( - ulong handle, - NativeArray data, - double dataVersion, - out double timestamp, - out SerializationCompressionType compressionType, - out int ack, - ref NativeArray outputBodyPose, - ref NativeArray outputFacePose, - ref NativeArray outputBodyTrackingPose, - ref FrameData frameData, - ref NativeArray outBindPose, - out int outBindPoseCount, - out CoordinateSpace coordinateSpaceSource) - { - Result success; - using (new ProfilerScope(nameof(DeserializeSkeletonAndFace))) - { - unsafe - { - DeserializedSnapshotDataUnmanaged snapshotDataUnmanaged = new DeserializedSnapshotDataUnmanaged(); - snapshotDataUnmanaged.TargetSkeletonPose = outputBodyPose.GetPtr(); - snapshotDataUnmanaged.FacePose = outputFacePose.GetPtr(); - snapshotDataUnmanaged.SourceSkeletonPose = outputBodyTrackingPose.GetPtr(); - snapshotDataUnmanaged.BindPose = outBindPose.GetPtr(); - - success = Api.metaMovementSDK_deserializeSnapshotData(handle, data.GetPtr(), dataVersion, - ref snapshotDataUnmanaged); - timestamp = snapshotDataUnmanaged.Timestamp; - compressionType = snapshotDataUnmanaged.Compression; - ack = snapshotDataUnmanaged.Ack; - frameData = snapshotDataUnmanaged.FrameData; - outBindPoseCount = snapshotDataUnmanaged.NumBindPoseJoints; - coordinateSpaceSource = snapshotDataUnmanaged.CoordinateSpaceSource; + deserializedSnapshotData.Timestamp = snapshotDataUnmanaged.Timestamp; + deserializedSnapshotData.CompressionType = snapshotDataUnmanaged.Compression; + deserializedSnapshotData.Ack = snapshotDataUnmanaged.Ack; + deserializedSnapshotData.FrameData = snapshotDataUnmanaged.FrameData; + deserializedSnapshotData.NumBindPoseJoints = snapshotDataUnmanaged.NumBindPoseJoints; + deserializedSnapshotData.CoordinateSpaceSource = snapshotDataUnmanaged.CoordinateSpaceSource; } } @@ -4877,7 +4949,8 @@ public static bool WriteConfigDataToJson(ulong handle, out string jsonConfigData public static bool ApplyWorldSpaceCoordinateSpaceConversionByRef( CoordinateSpace inCoordinateSpace, CoordinateSpace outCoordinateSpace, - ref NativeArray transformData) + ref NativeArray transformData, + bool applyFBXandGLBModelFileJointRotationFixup = true) { Result success; using (new ProfilerScope(nameof(ApplyWorldSpaceCoordinateSpaceConversionByRef))) @@ -4887,6 +4960,7 @@ public static bool ApplyWorldSpaceCoordinateSpaceConversionByRef( success = Api.metaMovementSDK_applyWorldSpaceCoordinateSpaceConversion( inCoordinateSpace, outCoordinateSpace, + applyFBXandGLBModelFileJointRotationFixup, transformData.GetPtr(), transformData.Length); } @@ -4908,7 +4982,8 @@ public static bool ApplyWorldSpaceCoordinateSpaceConversionByRef( public static bool ApplyWorldSpaceCoordinateSpaceConversion( CoordinateSpace inCoordinateSpace, CoordinateSpace outCoordinateSpace, - ref NativeTransform transformData) + ref NativeTransform transformData, + bool applyFBXandGLBModelFileJointRotationFixup = true) { Result success; using (new ProfilerScope(nameof(ApplyWorldSpaceCoordinateSpaceConversion))) @@ -4921,6 +4996,7 @@ public static bool ApplyWorldSpaceCoordinateSpaceConversion( success = Api.metaMovementSDK_applyWorldSpaceCoordinateSpaceConversion( inCoordinateSpace, outCoordinateSpace, + applyFBXandGLBModelFileJointRotationFixup, tempArray.GetPtr(), tempArray.Length); } diff --git a/Runtime/Native/Scripts/Networking/NGO/NetworkCharacterDataStreamNGO.cs.meta b/Runtime/Native/Scripts/Networking/NGO/NetworkCharacterDataStreamNGO.cs.meta index 6c3a4ba..254b360 100644 --- a/Runtime/Native/Scripts/Networking/NGO/NetworkCharacterDataStreamNGO.cs.meta +++ b/Runtime/Native/Scripts/Networking/NGO/NetworkCharacterDataStreamNGO.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 9e3a0bca50ee4414f8639b55e39f0d89 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 9e3a0bca50ee4414f8639b55e39f0d89 \ No newline at end of file diff --git a/Runtime/Native/Scripts/Networking/NetworkCharacterBehaviourLocal.cs b/Runtime/Native/Scripts/Networking/NetworkCharacterBehaviourLocal.cs index caf91dc..2e31c9c 100644 --- a/Runtime/Native/Scripts/Networking/NetworkCharacterBehaviourLocal.cs +++ b/Runtime/Native/Scripts/Networking/NetworkCharacterBehaviourLocal.cs @@ -110,13 +110,6 @@ private void Update() public void ReceiveStreamData(ulong clientId, bool isReliable, NativeArray bytes) { _target.ReceiveData(bytes); - // Custom scale implementation for transmitted data. - var targetScale = _self.transform.localScale; - if (Mathf.Abs(_receivedScale - targetScale.sqrMagnitude) >= 0.1f) - { - _receivedScale = targetScale.sqrMagnitude; - _target.transform.localScale = targetScale; - } _debugExpectedSizeInBytes += bytes.Length; } diff --git a/Runtime/Native/Scripts/Networking/NetworkCharacterHandler.cs b/Runtime/Native/Scripts/Networking/NetworkCharacterHandler.cs index 1bae188..bebf61f 100644 --- a/Runtime/Native/Scripts/Networking/NetworkCharacterHandler.cs +++ b/Runtime/Native/Scripts/Networking/NetworkCharacterHandler.cs @@ -438,6 +438,8 @@ private void SerializeData(int lastAck, float networkTime) } var bodyPose = _networkCharacterRetargeter.GetCurrentBodyPose(Retargeting.JointType.NoWorldSpace); + bodyPose[0] = new NativeTransform(bodyPose[0].Orientation, bodyPose[0].Position, + _networkCharacterRetargeter.SkeletonRetargeter.RetargetedPose[0].Scale); var facePose = _networkCharacterRetargeter.GetCurrentFacePose(true); var bodyIndicesToSerialize = lastAck == -1 @@ -445,14 +447,31 @@ private void SerializeData(int lastAck, float networkTime) : _networkCharacterRetargeter.BodyIndicesToSend; var faceIndicesToSerialize = _networkCharacterRetargeter.FaceIndicesToSync; + var bodyIndices = new NativeArray(bodyIndicesToSerialize.Length, Allocator.Temp, + NativeArrayOptions.UninitializedMemory); + var faceIndices = new NativeArray(faceIndicesToSerialize.Length, Allocator.Temp, + NativeArrayOptions.UninitializedMemory); + bodyIndices.CopyFrom(bodyIndicesToSerialize); + faceIndices.CopyFrom(faceIndicesToSerialize); + + var snapshotData = new SnapshotData + { + BaselineAck = lastAck, + Timestamp = networkTime, + TargetSkeletonPose = bodyPose, + TargetSkeletonIndices = bodyIndices, + FacePose = facePose, + FaceIndices = faceIndices, + RecordingCoordinateSpaceSource = new CoordinateSpace( + up: new Vector3(0.0f, 1.0f, 0.0f), + forward: new Vector3(0.0f, 0.0f, 1.0f), + right: new Vector3(1.0f, 0.0f, 0.0f), + metersToUnitScale: 1.0f) + }; + _dataIsValid = SerializeSkeletonAndFace( _networkCharacterRetargeter.RetargetingHandle, - networkTime, - bodyPose, - facePose, - lastAck, - bodyIndicesToSerialize, - faceIndicesToSerialize, + snapshotData, ref _serializedData); if (bodyPose.IsCreated) @@ -470,25 +489,27 @@ private void DeserializeData() { var data = _streamedData.Dequeue(); + var deserializedSnapshotData = new DeserializedSnapshotData + { + DataVersion = SERIALIZATION_VERSION_CURRENT, + TargetSkeletonPose = _bodyPose, + FacePose = _facePose + }; + if (!DeserializeSkeletonAndFace( _networkCharacterRetargeter.RetargetingHandle, data, - SERIALIZATION_VERSION_CURRENT, - out var timestamp, - out var receivedCompressionType, - out var ack, - ref _bodyPose, - ref _facePose)) + ref deserializedSnapshotData)) { _dataIsValid = false; data.Dispose(); return; } - + _networkCharacterRetargeter.transform.localScale = deserializedSnapshotData.TargetSkeletonPose[0].Scale; data.Dispose(); _networkCharacterRetargeter.DeNormalizeFaceValues(ref _facePose); _dataIsValid = true; - SendAck(ack); + SendAck(deserializedSnapshotData.Ack); } private bool ReadBodyData(float renderTime) diff --git a/Runtime/Native/Scripts/Networking/PhotonFusion/NetworkCharacterDataStreamFusion.cs.meta b/Runtime/Native/Scripts/Networking/PhotonFusion/NetworkCharacterDataStreamFusion.cs.meta index 7380514..bb33e4a 100644 --- a/Runtime/Native/Scripts/Networking/PhotonFusion/NetworkCharacterDataStreamFusion.cs.meta +++ b/Runtime/Native/Scripts/Networking/PhotonFusion/NetworkCharacterDataStreamFusion.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 41d33de703d006341b67854d1e31c6e6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 41d33de703d006341b67854d1e31c6e6 \ No newline at end of file diff --git a/Runtime/Native/Scripts/Retargeting/CharacterRetargeter.cs b/Runtime/Native/Scripts/Retargeting/CharacterRetargeter.cs index dc77aa2..f3d569e 100644 --- a/Runtime/Native/Scripts/Retargeting/CharacterRetargeter.cs +++ b/Runtime/Native/Scripts/Retargeting/CharacterRetargeter.cs @@ -79,6 +79,24 @@ public bool DebugDrawTargetSkeleton set => _debugDrawTargetSkeleton = value; } + /// + /// True if debug draw of the source T-pose should be enabled. + /// + public bool DebugDrawSourceTPose + { + get => _debugDrawSourceTPose; + set => _debugDrawSourceTPose = value; + } + + /// + /// True if debug draw of the target T-pose should be enabled. + /// + public bool DebugDrawTargetTPose + { + get => _debugDrawTargetTPose; + set => _debugDrawTargetTPose = value; + } + /// /// Use this to wait for the convert pose job to complete. /// @@ -99,7 +117,7 @@ public bool DebugDrawTargetSkeleton /// The color to use when drawing the source skeleton debug visualization. /// [SerializeField] - protected Color _debugDrawSourceSkeletonColor = Color.white; + protected Color _debugDrawSourceSkeletonColor = new(0.5f, 0.75f, 1f); /// /// Whether to draw debug visualization for the target skeleton. @@ -111,7 +129,7 @@ public bool DebugDrawTargetSkeleton /// The color to use when drawing the target skeleton debug visualization. /// [SerializeField] - protected Color _debugDrawTargetSkeletonColor = Color.green; + protected Color _debugDrawTargetSkeletonColor = new(1f, 0.75f, 0.5f); /// /// The color to use when drawing an invalid target skeleton debug visualization. @@ -125,6 +143,30 @@ public bool DebugDrawTargetSkeleton [SerializeField] protected Color _debugDrawInvalidSourceSkeletonColor = Color.magenta; + /// + /// Whether to draw debug visualization for the source T-pose skeleton. + /// + [SerializeField] + protected bool _debugDrawSourceTPose; + + /// + /// The color to use when drawing the source T-pose skeleton debug visualization. + /// + [SerializeField] + protected Color _debugDrawSourceTPoseColor = new(0f, 0.5f, 1f); + + /// + /// Whether to draw debug visualization for the target T-pose skeleton. + /// + [SerializeField] + protected bool _debugDrawTargetTPose; + + /// + /// The color to use when drawing the target T-pose skeleton debug visualization. + /// + [SerializeField] + protected Color _debugDrawTargetTPoseColor = new(1f, 0.5f, 0f); + /// /// The skeleton retargeter instance used for retargeting operations. /// @@ -218,6 +260,11 @@ public virtual void LateUpdate() _skeletonRetargeter.DrawInvalidTargetPose(_debugDrawInvalidTargetSkeletonColor); } + if (_debugDrawTargetTPose) + { + _skeletonRetargeter.DrawDebugTargetTPose(_debugDrawTransform, _debugDrawTargetTPoseColor); + } + return; } @@ -361,6 +408,11 @@ public void CalculatePose(NativeArray sourcePose) { _skeletonRetargeter.DrawDebugSourcePose(_debugDrawTransform, _debugDrawSourceSkeletonColor); } + + if (_debugDrawSourceTPose) + { + _skeletonRetargeter.DrawDebugSourceTPose(_debugDrawTransform, _debugDrawSourceTPoseColor); + } } /// @@ -393,6 +445,11 @@ public void UpdatePose() _skeletonRetargeter.DrawInvalidTargetPose(_debugDrawInvalidTargetSkeletonColor); } } + + if (_debugDrawTargetTPose) + { + _skeletonRetargeter.DrawDebugTargetTPose(_debugDrawTransform, _debugDrawTargetTPoseColor); + } } /// diff --git a/Runtime/Native/Scripts/Retargeting/CharacterRetargeterConfig.cs b/Runtime/Native/Scripts/Retargeting/CharacterRetargeterConfig.cs index c9eb8b9..b2070cc 100644 --- a/Runtime/Native/Scripts/Retargeting/CharacterRetargeterConfig.cs +++ b/Runtime/Native/Scripts/Retargeting/CharacterRetargeterConfig.cs @@ -340,6 +340,12 @@ private bool UseWorldSpace(int jointIndex, JointType jointType) /// public virtual void OnValidate() { +#if UNITY_EDITOR + if (UnityEditor.BuildPipeline.isBuildingPlayer) + { + return; + } +#endif ValidateConfiguration(); } diff --git a/Runtime/Native/Scripts/Retargeting/MeshDraw.cs b/Runtime/Native/Scripts/Retargeting/MeshDraw.cs index 43bd0a8..77c50bc 100644 --- a/Runtime/Native/Scripts/Retargeting/MeshDraw.cs +++ b/Runtime/Native/Scripts/Retargeting/MeshDraw.cs @@ -149,7 +149,7 @@ public static void DrawOVRSkeleton( return; } - var pose = SkeletonUtilities.GetPosesFromTheTracker( + using var pose = SkeletonUtilities.GetPosesFromTheTracker( dataProvider, offset, convertToUnitySpace); diff --git a/Runtime/Native/Scripts/Retargeting/MeshDraw.cs.meta b/Runtime/Native/Scripts/Retargeting/MeshDraw.cs.meta index 1aef51a..645d980 100644 --- a/Runtime/Native/Scripts/Retargeting/MeshDraw.cs.meta +++ b/Runtime/Native/Scripts/Retargeting/MeshDraw.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 66b13c2581345554fb4fc3e1a1db99da -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 66b13c2581345554fb4fc3e1a1db99da \ No newline at end of file diff --git a/Runtime/Native/Scripts/Retargeting/MetaSourceDataProvider.cs b/Runtime/Native/Scripts/Retargeting/MetaSourceDataProvider.cs index 3b9b893..8f73a51 100644 --- a/Runtime/Native/Scripts/Retargeting/MetaSourceDataProvider.cs +++ b/Runtime/Native/Scripts/Retargeting/MetaSourceDataProvider.cs @@ -13,70 +13,49 @@ namespace Meta.XR.Movement.Retargeting /// public class MetaSourceDataProvider : OVRBody, ISourceDataProvider { - /// Enable debug skeleton visualization. - public bool DebugDrawSkeleton - { - get => _debugDrawSkeleton; - set => _debugDrawSkeleton = value; - } - - /// Enable AI Motion Synthesizer blending with body tracking. - public bool EnableAIMotionSynthesizer - { - get => _enableAIMotionSynthesizer; - set => _enableAIMotionSynthesizer = value; - } - - /// Manifestation name returned when using upper body tracking. public const string HalfBodyManifestation = "halfbody"; - /// - /// Delay before body tracking is considered valid. Allows tracking to stabilize on startup. - /// - [SerializeField] - protected float _validBodyTrackingDelay = 0.25f; - - [Tooltip("Enable debug skeleton visualization")] - [SerializeField] - protected bool _debugDrawSkeleton; + private const int FullBodyJointCount = (int)SkeletonData.FullBodyTrackingBoneId.End; + private const int UpperBodyJointCount = (int)SkeletonData.BodyTrackingBoneId.End; - [Tooltip("Color for debug skeleton visualization")] - [SerializeField] - protected Color _debugSkeletonColor = Color.white; + public bool DebugDrawSkeleton { get => _debugDrawSkeleton; set => _debugDrawSkeleton = value; } + public bool EnableAIMotionSynthesizer { get => _enableAIMotionSynthesizer; set => _enableAIMotionSynthesizer = value; } - [Tooltip("Enable AI Motion Synthesizer for natural locomotion animations")] - [SerializeField] - protected bool _enableAIMotionSynthesizer; + [SerializeField] protected float _validBodyTrackingDelay = 0.25f; + [SerializeField] protected bool _debugDrawSkeleton; + [SerializeField] protected Color _debugSkeletonColor = Color.white; + [SerializeField] protected bool _enableAIMotionSynthesizer; + [SerializeField] protected AIMotionSynthesizerConfig _aiMotionSynthesizerConfig = new(); - /// AI Motion Synthesizer configuration. Only used when is true. - [SerializeField] - protected AIMotionSynthesizerConfig _aiMotionSynthesizerConfig = new(); protected AI.AIMotionSynthesizer _aiMotionSynthesizer; - protected OVRPlugin.BodyJointSet _currentSkeletonType; protected int _skeletalChangedCount = -1; protected int _currentSkeletalChangeCount = -1; protected float _currentValidBodyTrackingTime; protected bool _isValid; + private bool IsUpperBody => ProvidedSkeletonType == OVRPlugin.BodyJointSet.UpperBody; + private bool IsSynthesizerActive => _enableAIMotionSynthesizer && _aiMotionSynthesizer is { IsInitialized: true }; + protected virtual void Start() { _currentSkeletonType = ProvidedSkeletonType; - - if (_enableAIMotionSynthesizer) + if (!_enableAIMotionSynthesizer) { - _aiMotionSynthesizer = new AI.AIMotionSynthesizer(_aiMotionSynthesizerConfig, transform); - _aiMotionSynthesizer.Initialize(); + return; } + _aiMotionSynthesizer = new AI.AIMotionSynthesizer(_aiMotionSynthesizerConfig, transform); + _aiMotionSynthesizer.Initialize(); } protected virtual void LateUpdate() { - if (_enableAIMotionSynthesizer) + if (!_enableAIMotionSynthesizer) { - _aiMotionSynthesizer.Update(Time.smoothDeltaTime); - _aiMotionSynthesizer.ApplyRootMotion(); + return; } + _aiMotionSynthesizer.Update(Time.smoothDeltaTime); + _aiMotionSynthesizer.ApplyRootMotion(); } protected virtual void OnDestroy() @@ -92,109 +71,59 @@ protected virtual void OnValidate() /// public virtual NativeArray GetSkeletonPose() { - var sourcePose = SkeletonUtilities.GetPosesFromTheTracker( - this, - Pose.identity, - true, - out _currentSkeletalChangeCount, - out _isValid); - + var sourcePose = SkeletonUtilities.GetPosesFromTheTracker(this, Pose.identity, true, out _currentSkeletalChangeCount, out _isValid); if (_currentValidBodyTrackingTime < _validBodyTrackingDelay) { _currentValidBodyTrackingTime += Time.smoothDeltaTime; _isValid = false; } - - NativeArray finalPose; - if (!_enableAIMotionSynthesizer || _aiMotionSynthesizer == null || !_aiMotionSynthesizer.IsInitialized) + if (_debugDrawSkeleton) { - finalPose = sourcePose; + MeshDraw.DrawOVRSkeleton(this, _debugSkeletonColor, 0.04f, new Pose(transform.position, transform.rotation)); } - else + if (!_isValid || !IsSynthesizerActive) { - NativeArray fullBodyPose = sourcePose; - bool createdFullBodyPose = false; - if (ProvidedSkeletonType == OVRPlugin.BodyJointSet.UpperBody) - { - fullBodyPose = ConstructFullBodyPoseFromUpperBody(sourcePose); - createdFullBodyPose = true; - } - - var blendedPose = _aiMotionSynthesizer.GetBlendedPose(fullBodyPose); - _aiMotionSynthesizer.DrawVisualization(fullBodyPose, blendedPose, new Pose(transform.position, transform.rotation)); - - if (ProvidedSkeletonType == OVRPlugin.BodyJointSet.UpperBody) - { - if (createdFullBodyPose) - { - fullBodyPose.Dispose(); - } - finalPose = ExtractUpperBodyFromFullBodyPose(blendedPose); - - if (blendedPose.IsCreated) - { - blendedPose.Dispose(); - } - if (sourcePose.IsCreated) - { - sourcePose.Dispose(); - } - } - else - { - if (sourcePose.IsCreated) - { - sourcePose.Dispose(); - } - finalPose = blendedPose; - } + return sourcePose; } + return IsUpperBody ? ProcessUpperBodyPose(sourcePose) : ProcessFullBodyPose(sourcePose); + } - if (_debugDrawSkeleton) + private NativeArray ProcessFullBodyPose(NativeArray sourcePose) + { + var blendedPose = _aiMotionSynthesizer.GetBlendedPose(sourcePose); + _aiMotionSynthesizer.DrawVisualization(sourcePose, blendedPose, new Pose(transform.position, transform.rotation)); + if (sourcePose.IsCreated) { - MeshDraw.DrawOVRSkeleton(this, _debugSkeletonColor); + sourcePose.Dispose(); } - - return finalPose; + return blendedPose; } - /// - /// Pads upper body pose to full body length with identity transforms for lower body. - /// - private NativeArray ConstructFullBodyPoseFromUpperBody(NativeArray upperBodyPose) + private NativeArray ProcessUpperBodyPose(NativeArray sourcePose) { - const int fullBodyJointCount = (int)SkeletonData.FullBodyTrackingBoneId.End; - const int upperBodyJointCount = (int)SkeletonData.BodyTrackingBoneId.End; - - var fullBodyPose = new NativeArray(fullBodyJointCount, Allocator.Temp); - - for (var i = 0; i < upperBodyJointCount && i < upperBodyPose.Length; i++) + var fullBodyPose = new NativeArray(FullBodyJointCount, Allocator.Temp); + var copyCount = Mathf.Min(UpperBodyJointCount, sourcePose.Length); + NativeArray.Copy(sourcePose, fullBodyPose, copyCount); + var identity = NativeTransform.Identity(); + for (var i = UpperBodyJointCount; i < FullBodyJointCount; i++) { - fullBodyPose[i] = upperBodyPose[i]; + fullBodyPose[i] = identity; } - for (var i = upperBodyJointCount; i < fullBodyJointCount; i++) + var blendedPose = _aiMotionSynthesizer.GetBlendedPose(fullBodyPose); + _aiMotionSynthesizer.DrawVisualization(fullBodyPose, blendedPose, new Pose(transform.position, transform.rotation)); + fullBodyPose.Dispose(); + + var upperBodyPose = new NativeArray(UpperBodyJointCount, Allocator.Temp); + NativeArray.Copy(blendedPose, upperBodyPose, Mathf.Min(UpperBodyJointCount, blendedPose.Length)); + if (blendedPose.IsCreated) { - fullBodyPose[i] = NativeTransform.Identity(); + blendedPose.Dispose(); } - - return fullBodyPose; - } - - /// - /// Extracts upper body joints from a full body pose array. - /// - private NativeArray ExtractUpperBodyFromFullBodyPose(NativeArray fullBodyPose) - { - const int upperBodyJointCount = (int)SkeletonData.BodyTrackingBoneId.End; - - var upperBodyPose = new NativeArray(upperBodyJointCount, Allocator.Temp); - - for (var i = 0; i < upperBodyJointCount && i < fullBodyPose.Length; i++) + if (sourcePose.IsCreated) { - upperBodyPose[i] = fullBodyPose[i]; + sourcePose.Dispose(); } - return upperBodyPose; } @@ -203,7 +132,7 @@ public virtual NativeArray GetSkeletonTPose() { var sourcePose = SkeletonUtilities.GetBindPoses(this); _skeletalChangedCount = _currentSkeletalChangeCount; - if (_enableAIMotionSynthesizer && _aiMotionSynthesizer.IsInitialized) + if (IsSynthesizerActive) { _aiMotionSynthesizer.UpdateTPose(sourcePose); } @@ -213,7 +142,7 @@ public virtual NativeArray GetSkeletonTPose() /// public virtual string GetManifestation() { - return _isValid && ProvidedSkeletonType == OVRPlugin.BodyJointSet.UpperBody ? HalfBodyManifestation : null; + return _isValid && IsUpperBody ? HalfBodyManifestation : null; } /// @@ -229,7 +158,6 @@ public virtual bool IsNewTPoseAvailable() { return _currentSkeletalChangeCount != _skeletalChangedCount; } - _currentSkeletonType = ProvidedSkeletonType; return true; } diff --git a/Runtime/Native/Scripts/Retargeting/SkeletonData.cs b/Runtime/Native/Scripts/Retargeting/SkeletonData.cs index 9fe3b70..dd1e311 100644 --- a/Runtime/Native/Scripts/Retargeting/SkeletonData.cs +++ b/Runtime/Native/Scripts/Retargeting/SkeletonData.cs @@ -313,6 +313,9 @@ public enum BodyTrackingBoneId [SerializeField] private int _rightLowerLegJointIndex = -1; [SerializeField] private int[] _fingerIndices; [SerializeField] private string[] _manifestations; + [SerializeField] private SkeletonFlags _flags; + + public SkeletonFlags Flags => _flags; /// /// Array of poses representing the T-pose configuration of the skeleton. @@ -451,6 +454,7 @@ public static SkeletonData CreateFromHandle(ulong configHandle, SkeletonType ske // Get skeleton info GetSkeletonInfo(configHandle, skeletonType, out var skeletonInfo); var jointCount = skeletonInfo.JointCount; + skeletonData._flags = skeletonInfo.Flags; // Extract joint hierarchy data using MSDKUtility API GetJointNames(configHandle, skeletonType, out var joints); @@ -567,6 +571,12 @@ public static SkeletonData CreateFromHandle(ulong configHandle, SkeletonType ske // Set other properties skeletonData._manifestations = skeletonData.ManifestationNames; + if (IsOVRSkeleton(skeletonData._joints)) + { + // Enable NoRotationCorrectionOnCoordConversion to preserve x-engine compatibility + skeletonData._flags |= SkeletonFlags.NoRotationCorrectionOnCoordConversion; + } + parentIndices.Dispose(); tPose.Dispose(); tPoseMin.Dispose(); @@ -581,7 +591,7 @@ public static SkeletonData CreateFromHandle(ulong configHandle, SkeletonType ske /// /// The root transform of the skeleton hierarchy. /// A new SkeletonData instance created from the transform hierarchy, or null if the hierarchy is invalid. - public static SkeletonData CreateFromTransform(Transform target) + public static SkeletonData CreateFromTransform(Transform target, SkeletonFlags skeletonFlags = SkeletonFlags.None) { var jointMapping = MSDKUtilityHelper.GetChildParentJointMapping(target, out var root); if (jointMapping == null) @@ -605,10 +615,13 @@ public static SkeletonData CreateFromTransform(Transform target) // Check if this is an OVRSkeleton by seeing if joints match FullBodyTrackingBoneId names var isOVRSkeleton = IsOVRSkeleton(jointMapping); + data._flags = skeletonFlags; // First pass: assign indices to all joints if (isOVRSkeleton) { + // Enable NoRotationCorrectionOnCoordConversion to preserve x-engine compatibility + data._flags |= SkeletonFlags.NoRotationCorrectionOnCoordConversion; // For OVRSkeleton, order joints by FullBodyTrackingBoneId enum order var orderedJoints = OrderJointsByFullBodyTrackingBoneId(jointMapping); foreach (var joint in orderedJoints) @@ -691,15 +704,10 @@ public static SkeletonData CreateFromTransform(Transform target) return data; } - /// - /// Checks if the joint mapping represents an OVRSkeleton by verifying if joints match FullBodyTrackingBoneId names. - /// - /// The joint mapping to check. - /// True if this is an OVRSkeleton, false otherwise. - private static bool IsOVRSkeleton(Dictionary jointMapping) + private static HashSet GetOVRBoneNames() { // Get all FullBodyTrackingBoneId enum names - var ovrBoneNames = new HashSet(); + var ovrBoneNames = new HashSet(StringComparer.OrdinalIgnoreCase); foreach (FullBodyTrackingBoneId boneId in Enum.GetValues(typeof(FullBodyTrackingBoneId))) { // Skip special markers @@ -713,18 +721,66 @@ private static bool IsOVRSkeleton(Dictionary jointMapping) ovrBoneNames.Add(boneId.ToString()); } + return ovrBoneNames; + } + + private static HashSet OVRBoneNames = GetOVRBoneNames(); + + public static Dictionary OVRBoneAliases = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + { "LeftHandLittlePinkyMetacarpal", nameof(FullBodyTrackingBoneId.LeftHandLittleMetacarpal) }, + { "LeftHandLittlePinkyProximal", nameof(FullBodyTrackingBoneId.LeftHandLittleProximal) }, + { "LeftHandLittlePinkyIntermediate", nameof(FullBodyTrackingBoneId.LeftHandLittleIntermediate) }, + { "LeftHandLittlePinkyDistal", nameof(FullBodyTrackingBoneId.LeftHandLittleDistal) }, + { "LeftHandLittlePinkyTip", nameof(FullBodyTrackingBoneId.LeftHandLittleTip) }, + { "RightHandLittlePinkyMetacarpal", nameof(FullBodyTrackingBoneId.RightHandLittleMetacarpal) }, + { "RightHandLittlePinkyProximal", nameof(FullBodyTrackingBoneId.RightHandLittleProximal) }, + { "RightHandLittlePinkyIntermediate", nameof(FullBodyTrackingBoneId.RightHandLittleIntermediate) }, + { "RightHandLittlePinkyDistal", nameof(FullBodyTrackingBoneId.RightHandLittleDistal) }, + { "RightHandLittlePinkyTip", nameof(FullBodyTrackingBoneId.RightHandLittleTip) }, + }; + + /// + /// Checks if the joint mapping represents an OVRSkeleton by verifying if joints match FullBodyTrackingBoneId names. + /// + /// The joint mapping to check. + /// True if this is an OVRSkeleton, false otherwise. + private static bool IsOVRSkeleton(Dictionary jointMapping, float requiredHitPct = 0.8f) + { // Check if at least 80% of the joints in the mapping match OVR bone names var matchCount = 0; foreach (var joint in jointMapping.Keys) { - if (ovrBoneNames.Contains(joint.name)) + if (OVRBoneNames.Contains(joint.name) || + (OVRBoneAliases.TryGetValue(joint.name, out string jointAlias) && OVRBoneNames.Contains(jointAlias))) { matchCount++; } } // If at least 80% of joints match OVR bone names, consider it an OVRSkeleton - return matchCount >= jointMapping.Count * 0.8f; + return matchCount >= jointMapping.Count * requiredHitPct; + } + + + + private static bool IsOVRSkeleton(string[] jointNames, float requiredHitPct = 1.0f) + { + if (OVRBoneNames.Count <= 0 || + ((float)(jointNames.Length) / (float)(OVRBoneNames.Count) < requiredHitPct)) + { + return false; + } + var matchCount = 0; + foreach (var joint in jointNames) + { + if (OVRBoneNames.Contains(joint) || + (OVRBoneAliases.TryGetValue(joint, out string jointAlias) && OVRBoneNames.Contains(jointAlias))) + { + matchCount++; + } + } + return (float)matchCount / (float)(OVRBoneNames.Count) >= requiredHitPct; } /// @@ -847,7 +903,7 @@ public void FilterJoints(string[] jointsToFilter) /// Fills a SkeletonInitParams structure with data from this SkeletonData instance. /// /// A SkeletonInitParams populated with this skeleton's data. - public SkeletonInitParams FillConfigInitParams() + public SkeletonInitParams FillConfigInitParams(SkeletonFlags additionalSkeletonFlags = SkeletonFlags.None) { var initParams = new SkeletonInitParams { @@ -858,6 +914,7 @@ public SkeletonInitParams FillConfigInitParams() UnscaledTPose = new NativeArray(TPoseArray, Allocator.Temp), MinTPose = new NativeArray(MinTPoseArray, Allocator.Temp), MaxTPose = new NativeArray(MaxTPoseArray, Allocator.Temp), + JointSpaceType = JointRelativeSpaceType.RootOriginRelativeSpace, // Optional data OptionalKnownSourceJointNamesById = KnownJoints, OptionalAutoMapJointData = GenerateAutoMappingExcludedJointDataFromJointNameList(AutoMapExcludedJointNames), @@ -865,7 +922,8 @@ public SkeletonInitParams FillConfigInitParams() OptionalManifestationJointCounts = ManifestationJointCounts, OptionalManifestationJointNames = ManifestationJointNames, // Blend shape data (empty for skeleton data) - BlendShapeNames = Array.Empty() + BlendShapeNames = Array.Empty(), + SkeletonFlags = additionalSkeletonFlags | Flags, }; return initParams; diff --git a/Runtime/Native/Scripts/Retargeting/SkeletonJobs.cs b/Runtime/Native/Scripts/Retargeting/SkeletonJobs.cs index 025145b..8f73e6c 100644 --- a/Runtime/Native/Scripts/Retargeting/SkeletonJobs.cs +++ b/Runtime/Native/Scripts/Retargeting/SkeletonJobs.cs @@ -92,6 +92,14 @@ public struct ApplyPoseJob : IJobParallelForTransform [ReadOnly] public int HipsJointIndex; + /// + /// Mask indicating which joints are mapped from the source skeleton. + /// Unmapped joints (value 0) are skipped, leaving them free for other components. + /// If empty, all joints are applied (backward compatible). + /// + [ReadOnly] + internal NativeArray MappedJointMask; + /// /// The current rotation index. /// @@ -101,6 +109,11 @@ public struct ApplyPoseJob : IJobParallelForTransform [BurstCompile] public void Execute(int index, TransformAccess transform) { + if (MappedJointMask.IsCreated && MappedJointMask[index] == 0) + { + return; + } + var bodyPose = BodyPose[index]; var isRotationOnly = CurrentRotationIndex >= 0 && CurrentRotationIndex < RotationOnlyIndices.Length && diff --git a/Runtime/Native/Scripts/Retargeting/SkeletonRetargeter.cs b/Runtime/Native/Scripts/Retargeting/SkeletonRetargeter.cs index 47521c7..324785a 100644 --- a/Runtime/Native/Scripts/Retargeting/SkeletonRetargeter.cs +++ b/Runtime/Native/Scripts/Retargeting/SkeletonRetargeter.cs @@ -247,21 +247,22 @@ public RetargetingBehavior RetargetingBehavior [SerializeField] private Vector2 _scaleRange = new(0.8f, 1.2f); - private SkeletonDraw _sourceSkeletonDraw = new() + private static readonly List _sourceJointsToIgnore = new() { - IndexesToIgnore = new List - { - (int)SkeletonData.FullBodyTrackingBoneId.LeftHandWristTwist, - (int)SkeletonData.FullBodyTrackingBoneId.RightHandWristTwist, - (int)SkeletonData.FullBodyTrackingBoneId.LeftHandPalm, - (int)SkeletonData.FullBodyTrackingBoneId.RightHandPalm - } + (int)SkeletonData.FullBodyTrackingBoneId.LeftHandWristTwist, + (int)SkeletonData.FullBodyTrackingBoneId.RightHandWristTwist, + (int)SkeletonData.FullBodyTrackingBoneId.LeftHandPalm, + (int)SkeletonData.FullBodyTrackingBoneId.RightHandPalm }; + private SkeletonDraw _sourceSkeletonDraw = new() { IndexesToIgnore = _sourceJointsToIgnore }; private SkeletonDraw _targetSkeletonDraw = new(); + private SkeletonDraw _sourceTPoseSkeletonDraw = new() { IndexesToIgnore = _sourceJointsToIgnore }; + private SkeletonDraw _targetTPoseSkeletonDraw = new(); private ulong _nativeHandle = INVALID_HANDLE; private NativeArray _targetReferencePose; private NativeArray _targetFingerIndices; + private NativeArray _mappedJointMask; private JobHandle _applyPoseJobHandle; /// @@ -310,6 +311,19 @@ public void Setup(string config) SourceParentIndices = new NativeArray(SourceSkeletonData.ParentIndices, Persistent); TargetParentIndices = new NativeArray(TargetSkeletonData.ParentIndices, Persistent); + // Build mapped joint mask so ApplyPose skips unmapped target joints + // (e.g. eye bones that have no source in body tracking). + // Only allocate when mapping data is available; a default (empty) mask + // means "apply all joints" (backward compatible). + if (GetSkeletonMappingTargetJoints(_nativeHandle, out var mappedTargetJoints)) + { + _mappedJointMask = new NativeArray(TargetSkeletonData.JointCount, Persistent); + foreach (int joint in mappedTargetJoints) + { + _mappedJointMask[joint] = 1; + } + } + // Setup T-Pose from native API. GetSkeletonTPoseByRef(_nativeHandle, SkeletonType.TargetSkeleton, SkeletonTPoseType.UnscaledTPose, JointRelativeSpaceType.LocalSpace, ref TargetReferencePoseLocal); @@ -334,11 +348,14 @@ public void Dispose() IsInitialized = false; _sourceSkeletonDraw = null; _targetSkeletonDraw = null; + _sourceTPoseSkeletonDraw = null; + _targetTPoseSkeletonDraw = null; _targetReferencePose.Dispose(); SourcePose.Dispose(); SourceReferencePose.Dispose(); RetargetedPose.Dispose(); RetargetedPoseLocal.Dispose(); + TargetReferencePoseLocal.Dispose(); // Dispose NativeArrays created from SkeletonData _targetFingerIndices.Dispose(); @@ -346,6 +363,10 @@ public void Dispose() SourceMaxTPose.Dispose(); SourceParentIndices.Dispose(); TargetParentIndices.Dispose(); + if (_mappedJointMask.IsCreated) + { + _mappedJointMask.Dispose(); + } // Destroy native handle. if (!DestroyHandle(_nativeHandle)) @@ -439,6 +460,7 @@ public void ApplyPose(ref TransformAccessArray joints) RotationOnlyIndices = _targetFingerIndices, RootJointIndex = RootJointIndex, HipsJointIndex = HipsJointIndex, + MappedJointMask = _mappedJointMask, CurrentRotationIndex = _retargetingBehavior == RetargetingBehavior.RotationsAndPositionsHandsRotationOnly ? 0 : -1 }; @@ -486,29 +508,49 @@ public void UpdateSourceReferencePose(NativeArray sourcePose, s /// public void DrawDebugSourcePose(Transform offset, Color color) { - _sourceSkeletonDraw ??= new SkeletonDraw + DrawDebugSourceSkeleton(ref _sourceSkeletonDraw, SourcePose, offset, color); + } + + /// + /// Debug draw the source T-pose (reference pose). + /// + public void DrawDebugSourceTPose(Transform offset, Color color) + { + if (!SourceReferencePose.IsCreated || SourceReferencePose.Length == 0) { - IndexesToIgnore = new List - { - (int)SkeletonData.FullBodyTrackingBoneId.LeftHandWristTwist, - (int)SkeletonData.FullBodyTrackingBoneId.RightHandWristTwist, - (int)SkeletonData.FullBodyTrackingBoneId.LeftHandPalm, - (int)SkeletonData.FullBodyTrackingBoneId.RightHandPalm - } - }; - if (_sourceSkeletonDraw.LineThickness <= float.Epsilon || _sourceSkeletonDraw.TintColor != color) + return; + } + + if (SourceReferencePose.Length == 1) { - _sourceSkeletonDraw.InitDraw(color); + var pos = offset.position + offset.rotation * SourceReferencePose[0].Position; + MeshDraw.DrawSphere(color, 0.04f, pos); + return; + } + + DrawDebugSourceSkeleton(ref _sourceTPoseSkeletonDraw, SourceReferencePose, offset, color); + } + + private void DrawDebugSourceSkeleton( + ref SkeletonDraw skeletonDraw, + NativeArray pose, + Transform offset, + Color color) + { + skeletonDraw ??= new SkeletonDraw { IndexesToIgnore = _sourceJointsToIgnore }; + if (skeletonDraw.LineThickness <= float.Epsilon || skeletonDraw.TintColor != color) + { + skeletonDraw.InitDraw(color); } var scale = offset.lossyScale; scale.x = scale.x >= 0.0f ? 1.0f : -1.0f; scale.y = scale.y >= 0.0f ? 1.0f : -1.0f; scale.z = scale.z >= 0.0f ? 1.0f : -1.0f; - var debugSourcePose = new NativeArray(SourcePose, Temp); - ApplyOffset(ref debugSourcePose, offset, scale); - _sourceSkeletonDraw.LoadDraw(debugSourcePose.Length, SourceSkeletonData.ParentIndices, debugSourcePose); - _sourceSkeletonDraw.Draw(); + var debugPose = new NativeArray(pose, Temp); + ApplyOffset(ref debugPose, offset, scale); + skeletonDraw.LoadDraw(debugPose.Length, SourceSkeletonData.ParentIndices, debugPose); + skeletonDraw.Draw(); } /// @@ -534,20 +576,52 @@ public void DrawInvalidSourcePose(Color color) /// If rendering world transforms. public void DrawDebugTargetPose(Transform offset, Color color, bool useWorldPose = false) { - _targetSkeletonDraw ??= new SkeletonDraw(); - if (_targetSkeletonDraw.LineThickness <= float.Epsilon || _targetSkeletonDraw.TintColor != color) + var targetWorldPose = useWorldPose + ? new NativeArray(RetargetedPose, Temp) + : GetWorldPoseFromLocalPose(RetargetedPoseLocal); + DrawDebugTargetSkeleton(ref _targetSkeletonDraw, targetWorldPose, offset, color); + } + + /// + /// Debug draw the target T-pose (reference pose). + /// + public void DrawDebugTargetTPose(Transform offset, Color color) + { + if (!TargetReferencePoseLocal.IsCreated || TargetReferencePoseLocal.Length == 0) { - _targetSkeletonDraw.InitDraw(color); + return; + } + + if (TargetReferencePoseLocal.Length == 1) + { + var worldPose = GetWorldPoseFromLocalPose(TargetReferencePoseLocal); + var pos = offset.position + offset.rotation * Vector3.Scale(offset.lossyScale, worldPose[0].Position); + MeshDraw.DrawSphere(color, 0.04f, pos); + worldPose.Dispose(); + return; + } + + var targetTPoseWorld = GetWorldPoseFromLocalPose(TargetReferencePoseLocal); + DrawDebugTargetSkeleton(ref _targetTPoseSkeletonDraw, targetTPoseWorld, offset, color); + } + + private void DrawDebugTargetSkeleton( + ref SkeletonDraw skeletonDraw, + NativeArray worldPose, + Transform offset, + Color color) + { + skeletonDraw ??= new SkeletonDraw(); + if (skeletonDraw.LineThickness <= float.Epsilon || skeletonDraw.TintColor != color) + { + skeletonDraw.InitDraw(color); } var scale = offset.lossyScale; - var targetWorldPose = useWorldPose - ? new NativeArray(RetargetedPose, Temp) - : GetWorldPoseFromLocalPose(RetargetedPoseLocal); - ApplyOffset(ref targetWorldPose, offset, scale); - _targetSkeletonDraw.LoadDraw(targetWorldPose.Length, TargetSkeletonData.ParentIndices, targetWorldPose); - _targetSkeletonDraw.Draw(); - targetWorldPose.Dispose(); + ApplyOffset(ref worldPose, offset, scale); + skeletonDraw.LoadDraw(worldPose.Length, TargetSkeletonData.ParentIndices, worldPose); + skeletonDraw.Draw(); + worldPose.Dispose(); } /// diff --git a/Runtime/Native/Scripts/Retargeting/SkeletonUtilities.cs b/Runtime/Native/Scripts/Retargeting/SkeletonUtilities.cs index 903f9e5..0fe9e95 100644 --- a/Runtime/Native/Scripts/Retargeting/SkeletonUtilities.cs +++ b/Runtime/Native/Scripts/Retargeting/SkeletonUtilities.cs @@ -366,6 +366,12 @@ public static NativeArray GetPosesFromTheTracker( return invalidPoses; } + // Apply trackingSpace to the offset + Transform trackingSpace = GetTrackingSpaceTransform(); + Matrix4x4 trackingToWorld = trackingSpace ? trackingSpace.localToWorldMatrix : Matrix4x4.identity; + offset.position = trackingToWorld.MultiplyPoint3x4(offset.position); + offset.rotation = trackingToWorld.rotation * offset.rotation; + // Convert to native arrays var boneTranslations = GetBoneTranslations(_data.BoneTranslations); var boneRotations = GetBoneRotations(_data.BoneRotations); diff --git a/Runtime/Native/Scripts/Retargeting/TargetProcessors/LocomotionSkeletalProcessor.cs b/Runtime/Native/Scripts/Retargeting/TargetProcessors/LocomotionSkeletalProcessor.cs index fba7bd5..b078a19 100644 --- a/Runtime/Native/Scripts/Retargeting/TargetProcessors/LocomotionSkeletalProcessor.cs +++ b/Runtime/Native/Scripts/Retargeting/TargetProcessors/LocomotionSkeletalProcessor.cs @@ -49,8 +49,8 @@ public string AnimatorVerticalParam public string AnimatorHorizontalParam { - get => _animatorVerticalParam; - set => _animatorVerticalParam = value; + get => _animatorHorizontalParam; + set => _animatorHorizontalParam = value; } public float AnimationSpeed diff --git a/Runtime/Native/Scripts/Serialization/PlaybackFunctions.cs b/Runtime/Native/Scripts/Serialization/PlaybackFunctions.cs index f329539..dd0ebc5 100644 --- a/Runtime/Native/Scripts/Serialization/PlaybackFunctions.cs +++ b/Runtime/Native/Scripts/Serialization/PlaybackFunctions.cs @@ -1,7 +1,6 @@ // Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. using System; -using System.Globalization; using System.IO; using Unity.Collections; using UnityEditor; diff --git a/Runtime/Native/Scripts/Serialization/SequenceFileReader.cs b/Runtime/Native/Scripts/Serialization/SequenceFileReader.cs index dbd8d2f..be1859c 100644 --- a/Runtime/Native/Scripts/Serialization/SequenceFileReader.cs +++ b/Runtime/Native/Scripts/Serialization/SequenceFileReader.cs @@ -3,10 +3,8 @@ using Meta.XR.Movement.Playback; using Meta.XR.Movement.Retargeting; using System; -using System.Globalization; using System.IO; using Unity.Collections; -using Unity.Jobs; using UnityEngine; using static Meta.XR.Movement.MSDKUtility; @@ -27,17 +25,13 @@ public class SequenceFileReader : IPlaybackBehaviour public bool HasOpenedFileForPlayback => _playbackManager.HasActivePlaybackFile; /// - public float BandwidthKbps => _bandwidthRecorder.BandwidthKbps; - private BandwidthRecorder _bandwidthRecorder = new BandwidthRecorder(); + public float BandwidthKbps => _playbackManager.BandwidthKbps; /// public bool UserActivelyScrubbing { - get => _activelyScrubbing; - set - { - _activelyScrubbing = value; - } + get => _playbackManager.IsActivelyScrubbing; + set => _playbackManager.IsActivelyScrubbing = value; } /// @@ -48,7 +42,7 @@ public bool UserActivelyScrubbing /// /// Gets whether the playback is currently active and not paused. /// - public bool IsPlaying => _playbackManager.HasActivePlaybackFile && !_pauseState; + public bool IsPlaying => _playbackManager.HasActivePlaybackFile && !_playbackManager.IsPaused; /// /// Gets the current playback time in seconds relative to the start time. @@ -57,17 +51,13 @@ public bool UserActivelyScrubbing private UInt64 _playbackHandle; - private SequencePlaybackManager _playbackManager = - new SequencePlaybackManager(); + private SequencePlaybackManager _playbackManager = new SequencePlaybackManager(); private NativeArray _deserSourcePose; private SerializationCompressionType _receivedCompressionType; - private CoordinateSpace _recordingCoordinateSpaceSource; private int _numSourceJoints; private int[] _sourceParentIndices; - private bool _activelyScrubbing; - private bool _pauseState = false; ~SequenceFileReader() { @@ -88,6 +78,11 @@ public void Init(UInt64 handle) Allocator.Temp, NativeArrayOptions.UninitializedMemory); GetParentJointIndexesByRef(_playbackHandle, SkeletonType.SourceSkeleton, ref nativeSourceParentIndices); _sourceParentIndices = nativeSourceParentIndices.ToArray(); + + // Set up playback manager delegates + _playbackManager.DeserializeDelegate = DeserializeData; + _playbackManager.LerpDelegate = LerpReceivedData; + _playbackManager.ProcessDelegate = ProcessReceivedData; } /// @@ -95,9 +90,7 @@ public bool Seek(int snapshotIndex) { return _playbackManager.Seek( _playbackHandle, - snapshotIndex, - ProcessSnapshotGetNetworkTimeDelegate, - DeserializeData); + snapshotIndex); } /// @@ -110,7 +103,7 @@ public bool PlayBackRecording(string playbackAssetPath) { MSDKUtility.ResetInterpolators(_playbackHandle); _playbackManager.ResetTimestampsToStart(); - _pauseState = false; + _playbackManager.IsPaused = false; } return _playbackManager.HasActivePlaybackFile; } @@ -118,7 +111,7 @@ public bool PlayBackRecording(string playbackAssetPath) /// public void SetPauseState(bool pauseState) { - _pauseState = pauseState; + _playbackManager.IsPaused = pauseState; } /// @@ -133,51 +126,10 @@ public void ClosePlaybackFile() /// public void PlayNextFrame() { - if (_activelyScrubbing) - { - return; - } - - if (_pauseState) - { - return; - } - - _playbackManager.NetworkTime += Time.deltaTime; - if (_playbackManager.ReadAllSnapshots) - { - _playbackManager.ResetTimestampsToStart(); - _playbackManager.RestartSnapshotReading(); - ResetInterpolators(_playbackHandle); - } - - if (_playbackManager.NetworkTime < _playbackManager.LastTimeStamp && _playbackManager.NetworkTime > 0.0f) - { - return; - } - byte[] snapshotBytes = _playbackManager.ReadNextSnapshotBytes(); - if (snapshotBytes != null) - { - float readTimestamp = ProcessSnapshotGetNetworkTimeDelegate(snapshotBytes); - _playbackManager.LastTimeStamp = (float)readTimestamp; - } - } - - /// - /// Processes snapshot bytes and returns the network time. - /// This method is used as a delegate for snapshot processing during playback. - /// - /// The snapshot bytes to process. - /// The network time of the processed snapshot. - public float ProcessSnapshotGetNetworkTimeDelegate( - byte[] snapshotBytes) - { - return _playbackManager.ProcessSnapshotBytesAndGetNetworkTime( - snapshotBytes, - _activelyScrubbing, - DeserializeData, - LerpReceivedData, - ProcessReceivedData); + _playbackManager.AdvanceFrame( + _playbackHandle, + Time.deltaTime, + out byte[] snapshotBytes); } private void LerpReceivedData() @@ -206,30 +158,27 @@ private bool DeserializeData(byte[] bytes) { nativeBytes[i] = bytes[i]; } - // Create dummy arguments for deserialized data that we don't care about. - var emptyBody = new NativeArray(1, Allocator.Temp); - var emptyFace = new NativeArray(1, Allocator.Temp); - var frameData = new FrameData(); + var bindPose = new NativeArray(_numSourceJoints, Allocator.Temp); - int numBindPose = 0; + var deserializedSnapshotData = new DeserializedSnapshotData + { + DataVersion = _playbackManager.DataVersion, + TargetSkeletonPose = new NativeArray(1, Allocator.Temp), + FacePose = new NativeArray(1, Allocator.Temp), + SourceSkeletonPose = _deserSourcePose, + BindPose = bindPose + }; + if (!DeserializeSkeletonAndFace( _playbackHandle, nativeBytes, - _playbackManager.DataVersion, - out var timestamp, - out _receivedCompressionType, - out var ack, - ref emptyBody, - ref emptyFace, - ref _deserSourcePose, - ref frameData, - ref bindPose, - out numBindPose, - out _recordingCoordinateSpaceSource)) + ref deserializedSnapshotData)) { Debug.LogError("Data deserialized is invalid!"); return false; } + + _receivedCompressionType = deserializedSnapshotData.CompressionType; return true; } diff --git a/Runtime/Native/Scripts/Serialization/SequencePlaybackManager.cs b/Runtime/Native/Scripts/Serialization/SequencePlaybackManager.cs index 5400c2b..1f5bb5a 100644 --- a/Runtime/Native/Scripts/Serialization/SequencePlaybackManager.cs +++ b/Runtime/Native/Scripts/Serialization/SequencePlaybackManager.cs @@ -1,5 +1,6 @@ // Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. +using Meta.XR.Movement.Recording; using System; using Unity.Collections; using UnityEngine; @@ -13,6 +14,38 @@ namespace Meta.XR.Movement.Playback /// public class SequencePlaybackManager { + /// + /// Result of advancing a frame during playback. + /// + public enum AdvanceFrameResult + { + /// + /// Playback is paused, no frame was advanced. + /// + Paused, + /// + /// Playback is being scrubbed by the user, no frame was advanced. + /// + Scrubbing, + /// + /// Network time has not yet reached the next snapshot timestamp. + /// + WaitingForTime, + /// + /// All snapshots have been read and playback has looped back to start. + /// Interpolators should be reset by the caller. + /// + LoopedToStart, + /// + /// A new snapshot was successfully read. + /// + SnapshotRead, + /// + /// Failed to read the next snapshot. + /// + ReadFailed + } + /// /// Number of snapshots available. /// @@ -66,18 +99,32 @@ public float LastTimeStamp /// public double DataVersion => _startHeader.DataVersion; + /// + /// Whether the user is actively scrubbing the timeline. + /// When true, frame advancement is skipped and lerping is disabled. + /// + public bool IsActivelyScrubbing + { + get => _isActivelyScrubbing; + set => _isActivelyScrubbing = value; + } + + /// + /// Whether playback is currently paused. + /// When true, frame advancement is skipped. + /// + public bool IsPaused + { + get => _isPaused; + set => _isPaused = value; + } + /// /// Delegate for processing a snapshot. /// /// Snapshot bytes to process. /// The timestamp of the snapshot. public delegate float ProcessSnapshotGetTimestamp(byte[] snapshotBytes); - /// - /// Delegate for deserializing a snapshot. - /// - /// Snapshot bytes. - /// If the snapshot was deserialized or not. - public delegate bool DeserializeSnapshot(byte[] snapshotBytes); /// /// Deserialize delegate. @@ -94,24 +141,42 @@ public float LastTimeStamp /// public delegate void ProcessReceivedData(); + /// + /// Delegate used for deserializing snapshot data. + /// Must be set before calling ProcessSnapshotBytesAndGetNetworkTime or Seek. + /// + public Deserialize DeserializeDelegate { get; set; } + + /// + /// Delegate used for lerping received tracking data. + /// Must be set before calling ProcessSnapshotBytesAndGetNetworkTime. + /// + public LerpReceivedTrackingData LerpDelegate { get; set; } + + /// + /// Delegate used for processing received data after deserialization. + /// Must be set before calling ProcessSnapshotBytesAndGetNetworkTime. + /// + public ProcessReceivedData ProcessDelegate { get; set; } + + /// + /// Current bandwidth in kilobits per second. + /// + public float BandwidthKbps => _bandwidthRecorder.BandwidthKbps; + private PlaybackFunctions.ReaderFileStream _playbackFile = null; private StartHeader _startHeader; private EndHeader _endHeader; private int _snapshotIndex = 0, _numSnapshotBytesReadSoFar = 0; private bool _playedFirstFrame = false; private int[] _snapshotToByteoffsetAfterHeader; + private bool _isActivelyScrubbing = false; + private bool _isPaused = false; private float _networkTime = 0.0f; private float _lastTimestamp = 0.0f; - /// - /// Restart all timestamps to the start timestamp. - /// - public void ResetTimestampsToStart() - { - _lastTimestamp = (float)StartNetworkTime; - _networkTime = (float)StartNetworkTime; - } + private BandwidthRecorder _bandwidthRecorder = new BandwidthRecorder(); /// /// Opens file for playback. @@ -130,6 +195,179 @@ public void OpenFileForPlayback(ulong handle, string playbackPath = null) _playedFirstFrame = false; } + /// + /// Closest playbackfile if already open. + /// + public void ClosePlaybackFileIfOpen() + { + if (_playbackFile != null) + { + _playbackFile.Dispose(); + _playbackFile = null; + } + } + + /// + /// Restart all timestamps to the start timestamp. + /// + public void ResetTimestampsToStart() + { + _lastTimestamp = (float)StartNetworkTime; + _networkTime = (float)StartNetworkTime; + } + + /// + /// Advances playback by the specified delta time and reads the next snapshot if ready. + /// This consolidates the common frame advancement logic used by playback consumers. + /// + /// Retargeting handle. + /// Time elapsed since last frame (typically Time.deltaTime). + /// Output: The snapshot bytes read, if any. + /// The result of the advance operation. + public AdvanceFrameResult AdvanceFrame( + ulong retargetingHandle, + float deltaTime, + out byte[] snapshotBytes) + { + snapshotBytes = null; + + if (_isPaused) + { + // Even if no bytes are read, we should update the bandwidth recorder to indicate the + // drop in the current bandwidth. + _bandwidthRecorder.IncrementTimeAndUpdateBandwidth(); + return AdvanceFrameResult.Paused; + } + + if (_isActivelyScrubbing) + { + _bandwidthRecorder.IncrementTimeAndUpdateBandwidth(); + return AdvanceFrameResult.Scrubbing; + } + + _networkTime += deltaTime; + + if (ReadAllSnapshots) + { + ResetTimestampsToStart(); + RestartSnapshotReading(); + ResetInterpolators(retargetingHandle); + _bandwidthRecorder.IncrementTimeAndUpdateBandwidth(); + return AdvanceFrameResult.LoopedToStart; + } + + if (_networkTime < _lastTimestamp && _networkTime > 0.0f) + { + _bandwidthRecorder.IncrementTimeAndUpdateBandwidth(); + return AdvanceFrameResult.WaitingForTime; + } + + snapshotBytes = ReadNextSnapshotBytes(); + if (snapshotBytes == null) + { + _bandwidthRecorder.IncrementTimeAndUpdateBandwidth(); + return AdvanceFrameResult.ReadFailed; + } + _lastTimestamp = ProcessSnapshotBytesAndGetNetworkTime(snapshotBytes); + _bandwidthRecorder.AddNumBytes(snapshotBytes.Length); + _bandwidthRecorder.IncrementTimeAndUpdateBandwidth(); + return AdvanceFrameResult.SnapshotRead; + } + + /// + /// Public-version of the seek function using stored delegates. + /// Requires DeserializeDelegate to be set. + /// + /// Native handle. + /// Snapshot index. + /// True if seek worked; false if not. + public bool Seek(UInt64 handle, int snapshotIndex) + { + Assert.IsNotNull(DeserializeDelegate, "DeserializeDelegate must be set before calling seek."); + + return Seek( + handle, + snapshotIndex, + ProcessSnapshotBytesAndGetNetworkTime, + DeserializeDelegate); + } + + /// + /// Obtains trimmed data for a specified range of snapshots. This includes + /// the max snapshot (as opposed to just the bytes up to it). + /// + /// Min snapshot index. + /// Max snapshot index. + /// New start header for trimmed data. + /// New end header for trimmed data. + /// Trimmed snapshot bytes. + /// True if trim operation worked; false if not. + public bool AssembleTrimmedData( + int minTrimmedSnapshot, + int maxTrimmedSnapshot, + out StartHeader newStartHeader, + out EndHeader newEndHeader, + out byte[] trimmedBytes) + { + newEndHeader = new EndHeader(); + newStartHeader = new StartHeader(); + trimmedBytes = null; + // Do error checks first. + if (!HasActivePlaybackFile) + { + Debug.LogError("Can't get trimmed data because no playback file has been currently loaded."); + return false; + } + if (minTrimmedSnapshot < 0 || maxTrimmedSnapshot < 0) + { + Debug.LogError($"Trim range ({minTrimmedSnapshot}-{maxTrimmedSnapshot}) " + + $"has at least one negative value, which is invalid."); + return false; + } + if (maxTrimmedSnapshot < minTrimmedSnapshot || + minTrimmedSnapshot >= NumSnapshots || + maxTrimmedSnapshot >= NumSnapshots) + { + Debug.LogError("Please make sure your min and max trimmed snapshot " + + $"range is between ({0}-{NumSnapshots - 1}), and " + + $"that the max is greater than or equal to the min. Your specified range " + + $"is ({minTrimmedSnapshot}-{maxTrimmedSnapshot})."); + return false; + } + + // make sure the min baseline is a full one + int snapshotsSinceLastSync, destinationSnapshotOffset; + (destinationSnapshotOffset, snapshotsSinceLastSync) = + GetByteOffsetAndLastSyncForSnapshotIndex(minTrimmedSnapshot); + if (snapshotsSinceLastSync > 0) + { + Debug.LogWarning($"Min trimmed snapshot index {minTrimmedSnapshot} is not a full one. " + + $"The baseline is {snapshotsSinceLastSync} backwards in time, which would be " + + $"{minTrimmedSnapshot - snapshotsSinceLastSync}. Will use that."); + minTrimmedSnapshot -= snapshotsSinceLastSync; + } + + trimmedBytes = _playbackFile.GetSnapshotRangeBytes( + minTrimmedSnapshot, + maxTrimmedSnapshot, + _snapshotToByteoffsetAfterHeader); + // the header of the clone need to be updated too to indicate restricted range. + newStartHeader = new StartHeader( + dataVersion: _startHeader.DataVersion, + osVersion: SystemInfo.operatingSystem, + gameEngineVersion: Application.unityVersion, + bundleID: Application.identifier, + metaXRSDKVersion: OVRPlugin.version.ToString(), + utcTimeStamp: DateTime.UtcNow.Ticks, + numSnapshots: (maxTrimmedSnapshot - minTrimmedSnapshot) + 1, + numTotalSnapshotBytes: trimmedBytes.Length, + startNetworkTime: _playbackFile.GetNetworkTimeForSnapshot(_snapshotToByteoffsetAfterHeader[minTrimmedSnapshot]), + numberOfBufferedSnapshots: _startHeader.NumBufferedSnapshots); + // re-use the old UTC timestamp to maintain some association with the original recording. + newEndHeader = new EndHeader(_endHeader.UTCTimestamp); + return true; + } + /// /// Gets byte offset of snapshot (after header) as well as baseline /// sync index for specified snapshot. @@ -138,7 +376,7 @@ public void OpenFileForPlayback(ulong handle, string playbackPath = null) /// Byte offset (after) header for snapshot as well /// as last baseline in terms of n snapshots in past. If 0, that means /// that current snapshot is the baseline. - public (int, int) GetByteOffsetAndLastSyncForSnapshotIndex(int snapshotIndex) + private (int, int) GetByteOffsetAndLastSyncForSnapshotIndex(int snapshotIndex) { int destinationSnapOffset = _snapshotToByteoffsetAfterHeader[snapshotIndex]; int snapshotsSinceLastSync = _playbackFile.GetSnapshotsSinceLastSync( @@ -151,7 +389,7 @@ public void OpenFileForPlayback(ulong handle, string playbackPath = null) /// in the plabyack file. /// /// Snapshot bytes read, if any. - public byte[] ReadNextSnapshotBytes() + private byte[] ReadNextSnapshotBytes() { if (_playbackFile == null) { @@ -192,7 +430,7 @@ public byte[] ReadNextSnapshotBytes() /// Snapshot index. /// Offset of snapshot in terms of bytes after the start header /// in the playback file. - public int GetSnapshotByteOffset(int snapshotIndex) + private int GetSnapshotByteOffset(int snapshotIndex) { if (snapshotIndex >= _snapshotToByteoffsetAfterHeader.Length) { @@ -213,7 +451,7 @@ public int GetSnapshotByteOffset(int snapshotIndex) /// seeked snapshot to offset specified. If true, then functions like /// from the offset called into this function. /// Bytes deserialized, if any. - public byte[] GetBytesAtSpecificSnapshotIndex(int byteOffset, int snapshotIndex, + private byte[] GetBytesAtSpecificSnapshotIndex(int byteOffset, int snapshotIndex, bool moveCurrentTrackedSnapshotToIndex = false) { var numSnapshotBytesReadSoFar = byteOffset; @@ -234,18 +472,35 @@ public byte[] GetBytesAtSpecificSnapshotIndex(int byteOffset, int snapshotIndex, return snapshotBytes; } + /// + /// Processes snapshot bytes and returns network time using stored delegates. + /// Requires DeserializeDelegate, LerpDelegate, and ProcessDelegate to be set. + /// + /// Snapshot bytes to process. + /// Network time. + private float ProcessSnapshotBytesAndGetNetworkTime(byte[] snapshotBytes) + { + Assert.IsNotNull(DeserializeDelegate, "DeserializeDelegate must be set before calling ProcessSnapshotBytesAndGetNetworkTime."); + Assert.IsNotNull(LerpDelegate, "LerpDelegate must be set before calling ProcessSnapshotBytesAndGetNetworkTime."); + Assert.IsNotNull(ProcessDelegate, "ProcessDelegate must be set before calling ProcessSnapshotBytesAndGetNetworkTime."); + + return ProcessSnapshotBytesAndGetNetworkTime( + snapshotBytes, + DeserializeDelegate, + LerpDelegate, + ProcessDelegate); + } + /// /// Processes snapshot bytes and returns network time. /// /// Snapshot bytes to process. - /// If data is being scrubbed or not. /// Deserialize delegate. /// Lerp delegate. /// Process received data delegate. /// Network time. - public float ProcessSnapshotBytesAndGetNetworkTime( + private float ProcessSnapshotBytesAndGetNetworkTime( byte[] snapshotBytes, - bool isScrubbingData, Deserialize deserializeDelegate, LerpReceivedTrackingData lerpReceivedData, ProcessReceivedData processReceivedData) @@ -260,7 +515,7 @@ public float ProcessSnapshotBytesAndGetNetworkTime( DeserializeSnapshotTimestamp(nativeBytesArray, out readTimestamp); if (deserializeDelegate(snapshotBytes)) { - if (!isScrubbingData) + if (!_isActivelyScrubbing) { lerpReceivedData(); } @@ -277,11 +532,11 @@ public float ProcessSnapshotBytesAndGetNetworkTime( /// Delegate that processes the target snapshot and gets the timestamp. /// Network time that should be modified based on seeking. /// True if seek worked; false if not. - public bool Seek( + private bool Seek( UInt64 handle, int snapshotIndex, ProcessSnapshotGetTimestamp processSnapshot, - DeserializeSnapshot deserializeSnapshot) + Deserialize deserializeSnapshot) { // Avoid seek if one can avoid it. if (snapshotIndex == SnapshotIndex) @@ -319,7 +574,7 @@ private bool Seek( UInt64 handle, int snapshotIndex, ProcessSnapshotGetTimestamp processSnapshot, - DeserializeSnapshot deserializeSnapshot, + Deserialize deserializeSnapshot, ref float networkTime) { if (!HasActivePlaybackFile) @@ -388,102 +643,14 @@ private bool Seek( return true; } - /// - /// Obtains trimmed data for a specified range of snapshots. This includes - /// the max snapshot (as opposed to just the bytes up to it). - /// - /// Min snapshot index. - /// Max snapshot index. - /// New start header for trimmed data. - /// New end header for trimmed data. - /// Trimmed snapshot bytes. - /// True if trim operation worked; false if not. - public bool AssembleTrimmedData( - int minTrimmedSnapshot, - int maxTrimmedSnapshot, - out StartHeader newStartHeader, - out EndHeader newEndHeader, - out byte[] trimmedBytes) - { - newEndHeader = new EndHeader(); - newStartHeader = new StartHeader(); - trimmedBytes = null; - // Do error checks first. - if (!HasActivePlaybackFile) - { - Debug.LogError("Can't get trimmed data because no playback file has been currently loaded."); - return false; - } - if (minTrimmedSnapshot < 0 || maxTrimmedSnapshot < 0) - { - Debug.LogError($"Trim range ({minTrimmedSnapshot}-{maxTrimmedSnapshot}) " + - $"has at least one negative value, which is invalid."); - return false; - } - if (maxTrimmedSnapshot < minTrimmedSnapshot || - minTrimmedSnapshot >= NumSnapshots || - maxTrimmedSnapshot >= NumSnapshots) - { - Debug.LogError("Please make sure your min and max trimmed snapshot " + - $"range is between ({0}-{NumSnapshots - 1}), and " + - $"that the max is greater than or equal to the min. Your specified range " + - $"is ({minTrimmedSnapshot}-{maxTrimmedSnapshot})."); - return false; - } - - // make sure the min baseline is a full one - int snapshotsSinceLastSync, destinationSnapshotOffset; - (destinationSnapshotOffset, snapshotsSinceLastSync) = - GetByteOffsetAndLastSyncForSnapshotIndex(minTrimmedSnapshot); - if (snapshotsSinceLastSync > 0) - { - Debug.LogWarning($"Min trimmed snapshot index {minTrimmedSnapshot} is not a full one. " - + $"The baseline is {snapshotsSinceLastSync} backwards in time, which would be " - + $"{minTrimmedSnapshot - snapshotsSinceLastSync}. Will use that."); - minTrimmedSnapshot -= snapshotsSinceLastSync; - } - - trimmedBytes = _playbackFile.GetSnapshotRangeBytes( - minTrimmedSnapshot, - maxTrimmedSnapshot, - _snapshotToByteoffsetAfterHeader); - // the header of the clone need to be updated too to indicate restricted range. - newStartHeader = new StartHeader( - dataVersion: _startHeader.DataVersion, - osVersion: SystemInfo.operatingSystem, - gameEngineVersion: Application.unityVersion, - bundleID: Application.identifier, - metaXRSDKVersion: OVRPlugin.version.ToString(), - utcTimeStamp: DateTime.UtcNow.Ticks, - numSnapshots: (maxTrimmedSnapshot - minTrimmedSnapshot) + 1, - numTotalSnapshotBytes: trimmedBytes.Length, - startNetworkTime: _playbackFile.GetNetworkTimeForSnapshot(_snapshotToByteoffsetAfterHeader[minTrimmedSnapshot]), - numberOfBufferedSnapshots: _startHeader.NumBufferedSnapshots); - // re-use the old UTC timestamp to maintain some association with the original recording. - newEndHeader = new EndHeader(_endHeader.UTCTimestamp); - return true; - } - /// /// Restarts snapshot reading to the beginning. /// - public void RestartSnapshotReading() + private void RestartSnapshotReading() { _snapshotIndex = 0; _numSnapshotBytesReadSoFar = 0; _playedFirstFrame = false; } - - /// - /// Closest playbackfile if already open. - /// - public void ClosePlaybackFileIfOpen() - { - if (_playbackFile != null) - { - _playbackFile.Dispose(); - _playbackFile = null; - } - } } } diff --git a/Samples/AdvancedSamples/Scenes/MovementAIMotionSynthesizer.unity b/Samples/AdvancedSamples/Scenes/MovementAIMotionSynthesizer.unity index 11504c8..bc121c8 100644 --- a/Samples/AdvancedSamples/Scenes/MovementAIMotionSynthesizer.unity +++ b/Samples/AdvancedSamples/Scenes/MovementAIMotionSynthesizer.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 9 + serializedVersion: 10 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -42,8 +42,8 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -66,9 +66,6 @@ LightmapSettings: m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 @@ -2888,7 +2885,7 @@ PrefabInstance: value: 1 objectReference: {fileID: 0} - target: {fileID: 2783184059496819323, guid: 0b567a7c6d47e774ca65c81546f02af5, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: 697d9a99ae3c7784bbef700ed300a1ca, type: 2} - target: {fileID: 5866666021909216657, guid: 0b567a7c6d47e774ca65c81546f02af5, type: 3} @@ -3045,6 +3042,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3150,6 +3150,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3452,6 +3455,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -3608,6 +3614,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -3765,6 +3772,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4013,6 +4023,9 @@ SkinnedMeshRenderer: m_ReflectionProbeUsage: 0 m_RayTracingMode: 3 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4132,6 +4145,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4288,6 +4304,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -4445,6 +4462,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4528,6 +4548,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: [] @@ -4697,6 +4720,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4853,6 +4879,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -5207,6 +5234,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5389,6 +5419,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5511,6 +5544,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5616,6 +5652,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5721,6 +5760,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6180,12 +6222,12 @@ MonoBehaviour: m_RequiresColorTexture: 0 m_Version: 2 m_TaaSettings: - quality: 3 - frameInfluence: 0.1 - jitterScale: 1 - mipBias: 0 - varianceClampScale: 0.9 - contrastAdaptiveSharpening: 0 + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!114 &387489585 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6224,12 +6266,12 @@ MonoBehaviour: m_RequiresColorTexture: 0 m_Version: 2 m_TaaSettings: - quality: 3 - frameInfluence: 0.1 - jitterScale: 1 - mipBias: 0 - varianceClampScale: 0.9 - contrastAdaptiveSharpening: 0 + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!1 &408677939 GameObject: m_ObjectHideFlags: 0 @@ -6428,6 +6470,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -6769,6 +6812,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6976,6 +7022,9 @@ MeshRenderer: m_ReflectionProbeUsage: 0 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7083,6 +7132,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7188,6 +7240,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7256,7 +7311,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 120, z: -180} --- !u!95 &527410303 Animator: - serializedVersion: 5 + serializedVersion: 7 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -7270,6 +7325,7 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 + m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 @@ -7360,6 +7416,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9505,6 +9564,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9677,6 +9739,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9771,6 +9836,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: [] @@ -9950,6 +10018,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10062,7 +10133,7 @@ MonoBehaviour: _eyeLevel: 0 --- !u!95 &713339273 Animator: - serializedVersion: 5 + serializedVersion: 7 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -10076,6 +10147,7 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 + m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 @@ -10131,6 +10203,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: [] @@ -10235,6 +10310,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10342,6 +10420,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10498,6 +10579,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -10713,6 +10795,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10818,6 +10903,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10923,6 +11011,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11087,6 +11178,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.1 m_Pitch: 1 @@ -11479,6 +11571,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11584,6 +11679,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -11954,6 +12052,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13132,15 +13233,15 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} - target: {fileID: 6588817268967568080, guid: ddca6acabb58ed7428c06ff150d2517a, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: 3b725ceeba99d7a488d01324becba22b, type: 2} - target: {fileID: 6588817268967568080, guid: ddca6acabb58ed7428c06ff150d2517a, type: 3} - propertyPath: m_Materials.Array.data[1] + propertyPath: 'm_Materials.Array.data[1]' value: objectReference: {fileID: 2100000, guid: 7b12e7dad34c31a41abde22b9fe67cb2, type: 2} - target: {fileID: 6588817268967568080, guid: ddca6acabb58ed7428c06ff150d2517a, type: 3} - propertyPath: m_Materials.Array.data[2] + propertyPath: 'm_Materials.Array.data[2]' value: objectReference: {fileID: 2100000, guid: fb173d26c94ecd542aac874a09bb84ae, type: 2} - target: {fileID: 7673121605214988447, guid: ddca6acabb58ed7428c06ff150d2517a, type: 3} @@ -13659,6 +13760,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13764,6 +13868,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13869,6 +13976,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14000,6 +14110,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14105,6 +14218,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14246,6 +14362,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14351,6 +14470,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14491,6 +14613,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14589,6 +14714,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: [] @@ -14806,7 +14934,7 @@ PrefabInstance: value: 115 objectReference: {fileID: 0} - target: {fileID: 2063780463137007006, guid: 9ea3c3bd7f7fe1043a0bb52ecda39ce6, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: -5702264900405319573, guid: 46f94e9fc26082448b12e8c575aa9e3a, type: 3} - target: {fileID: 2202984725689992322, guid: 9ea3c3bd7f7fe1043a0bb52ecda39ce6, type: 3} @@ -14942,7 +15070,7 @@ PrefabInstance: value: 127 objectReference: {fileID: 0} - target: {fileID: 4116065783456042991, guid: 9ea3c3bd7f7fe1043a0bb52ecda39ce6, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: f89e9bc336534884abf771b6461768cb, type: 2} - target: {fileID: 4207441631813966614, guid: 9ea3c3bd7f7fe1043a0bb52ecda39ce6, type: 3} @@ -15724,6 +15852,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -15829,6 +15960,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -15936,6 +16070,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -16124,6 +16261,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -16405,6 +16545,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -16471,7 +16614,7 @@ PrefabInstance: value: 1 objectReference: {fileID: 0} - target: {fileID: 7809587273292597666, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} - propertyPath: _retargeters.Array.data[0] + propertyPath: '_retargeters.Array.data[0]' value: objectReference: {fileID: 2079912539} - target: {fileID: 7809587273292597666, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} @@ -16479,7 +16622,7 @@ PrefabInstance: value: 1 objectReference: {fileID: 0} - target: {fileID: 7809587273292597666, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} - propertyPath: _debugDrawTransforms.Array.data[0] + propertyPath: '_debugDrawTransforms.Array.data[0]' value: objectReference: {fileID: 960035821} m_RemovedComponents: [] @@ -16573,6 +16716,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -16910,15 +17056,17 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_enableWordWrapping: 0 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 + m_EmojiFallbackSupport: 1 m_parseCtrlCharacters: 1 m_isOrthographic: 1 m_isCullingEnabled: 0 @@ -17067,6 +17215,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -17277,6 +17426,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -17539,6 +17691,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -17794,6 +17947,9 @@ SkinnedMeshRenderer: m_ReflectionProbeUsage: 0 m_RayTracingMode: 3 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -18034,6 +18190,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -18117,6 +18276,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -18222,6 +18384,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -18298,12 +18463,12 @@ MonoBehaviour: m_RequiresColorTexture: 0 m_Version: 2 m_TaaSettings: - quality: 3 - frameInfluence: 0.1 - jitterScale: 1 - mipBias: 0 - varianceClampScale: 0.9 - contrastAdaptiveSharpening: 0 + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!1 &1440870905 GameObject: m_ObjectHideFlags: 0 @@ -18577,6 +18742,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -18739,6 +18905,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -18879,6 +19048,9 @@ MeshRenderer: m_ReflectionProbeUsage: 0 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -19112,6 +19284,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -19180,7 +19355,7 @@ Transform: m_LocalEulerAnglesHint: {x: -20, y: -90, z: 0} --- !u!95 &1569194779 Animator: - serializedVersion: 5 + serializedVersion: 7 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -19194,6 +19369,7 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 + m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 @@ -19273,6 +19449,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -19367,7 +19546,7 @@ PrefabInstance: value: 1 objectReference: {fileID: 0} - target: {fileID: 2783184059496819323, guid: 0b567a7c6d47e774ca65c81546f02af5, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: 697d9a99ae3c7784bbef700ed300a1ca, type: 2} - target: {fileID: 5866666021909216657, guid: 0b567a7c6d47e774ca65c81546f02af5, type: 3} @@ -19705,15 +19884,17 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_enableWordWrapping: 0 + m_TextWrappingMode: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} parentLinkedComponent: {fileID: 0} m_enableKerning: 1 + m_ActiveFontFeatures: 6e72656b m_enableExtraPadding: 0 checkPaddingRequired: 0 m_isRichText: 1 + m_EmojiFallbackSupport: 1 m_parseCtrlCharacters: 1 m_isOrthographic: 1 m_isCullingEnabled: 0 @@ -19811,6 +19992,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -19966,6 +20150,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -20188,6 +20375,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -20528,6 +20718,7 @@ AudioSource: serializedVersion: 4 OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} m_PlayOnAwake: 0 m_Volume: 0.2 m_Pitch: 1 @@ -20663,6 +20854,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: [] @@ -21178,6 +21372,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -21315,6 +21512,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -21817,6 +22017,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22071,6 +22274,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22412,6 +22618,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22605,6 +22814,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22710,6 +22922,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -22778,7 +22993,7 @@ Transform: m_LocalEulerAnglesHint: {x: -20, y: -90, z: 0} --- !u!95 &2037138706 Animator: - serializedVersion: 5 + serializedVersion: 7 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -22792,6 +23007,7 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 + m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 @@ -22827,10 +23043,6 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 482840528} m_Modifications: - - target: {fileID: 2218561895180544249, guid: 543a43a2346d7a24bb2126bb13392d90, type: 3} - propertyPath: _aiMotionSynthesizerConfig.UpperBodySource - value: 1 - objectReference: {fileID: 0} - target: {fileID: 2218561895180544249, guid: 543a43a2346d7a24bb2126bb13392d90, type: 3} propertyPath: _aiMotionSynthesizerConfig.ReferenceTransform value: @@ -23549,51 +23761,51 @@ PrefabInstance: value: 6 objectReference: {fileID: 0} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[0] + propertyPath: '_monoBehaviours.Array.data[0]' value: objectReference: {fileID: 2051347831} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[1] + propertyPath: '_monoBehaviours.Array.data[1]' value: objectReference: {fileID: 1852034483} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[2] + propertyPath: '_monoBehaviours.Array.data[2]' value: objectReference: {fileID: 1806934119} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[3] + propertyPath: '_monoBehaviours.Array.data[3]' value: objectReference: {fileID: 1376265682} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[4] + propertyPath: '_monoBehaviours.Array.data[4]' value: objectReference: {fileID: 1806963174} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[5] + propertyPath: '_monoBehaviours.Array.data[5]' value: objectReference: {fileID: 1618252187} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[6] + propertyPath: '_monoBehaviours.Array.data[6]' value: objectReference: {fileID: 1376265682} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[7] + propertyPath: '_monoBehaviours.Array.data[7]' value: objectReference: {fileID: 1376265682} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[8] + propertyPath: '_monoBehaviours.Array.data[8]' value: objectReference: {fileID: 1376265682} - target: {fileID: 5055166467490395830, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[9] + propertyPath: '_monoBehaviours.Array.data[9]' value: objectReference: {fileID: 1376265682} - target: {fileID: 5590366407522828040, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _gameObjects.Array.data[0] + propertyPath: '_gameObjects.Array.data[0]' value: objectReference: {fileID: 1857473534} - target: {fileID: 5590366407522828040, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _gameObjects.Array.data[1] + propertyPath: '_gameObjects.Array.data[1]' value: objectReference: {fileID: 1801481170} - target: {fileID: 5638038389960809837, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} @@ -23609,23 +23821,23 @@ PrefabInstance: value: 3 objectReference: {fileID: 0} - target: {fileID: 5918787263731088430, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _gameObjects.Array.data[0] + propertyPath: '_gameObjects.Array.data[0]' value: objectReference: {fileID: 1846165782} - target: {fileID: 5918787263731088430, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _gameObjects.Array.data[1] + propertyPath: '_gameObjects.Array.data[1]' value: objectReference: {fileID: 1756782220} - target: {fileID: 5918787263731088430, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _gameObjects.Array.data[2] + propertyPath: '_gameObjects.Array.data[2]' value: objectReference: {fileID: 801118785} - target: {fileID: 5918787263731088430, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _gameObjects.Array.data[3] + propertyPath: '_gameObjects.Array.data[3]' value: objectReference: {fileID: 1096728623} - target: {fileID: 5918787263731088430, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _gameObjects.Array.data[4] + propertyPath: '_gameObjects.Array.data[4]' value: objectReference: {fileID: 1096728623} - target: {fileID: 6370319769469448785, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} @@ -23673,51 +23885,51 @@ PrefabInstance: value: 6 objectReference: {fileID: 0} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[0] + propertyPath: '_monoBehaviours.Array.data[0]' value: objectReference: {fileID: 1787735219} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[1] + propertyPath: '_monoBehaviours.Array.data[1]' value: objectReference: {fileID: 2051347830} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[2] + propertyPath: '_monoBehaviours.Array.data[2]' value: objectReference: {fileID: 1852034482} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[3] + propertyPath: '_monoBehaviours.Array.data[3]' value: objectReference: {fileID: 113177210} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[4] + propertyPath: '_monoBehaviours.Array.data[4]' value: objectReference: {fileID: 1806934117} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[5] + propertyPath: '_monoBehaviours.Array.data[5]' value: objectReference: {fileID: 1376265681} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[6] + propertyPath: '_monoBehaviours.Array.data[6]' value: objectReference: {fileID: 1376265681} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[7] + propertyPath: '_monoBehaviours.Array.data[7]' value: objectReference: {fileID: 1376265681} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[8] + propertyPath: '_monoBehaviours.Array.data[8]' value: objectReference: {fileID: 1376265681} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[9] + propertyPath: '_monoBehaviours.Array.data[9]' value: objectReference: {fileID: 1376265681} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[10] + propertyPath: '_monoBehaviours.Array.data[10]' value: objectReference: {fileID: 1376265681} - target: {fileID: 6397037460483130501, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _monoBehaviours.Array.data[11] + propertyPath: '_monoBehaviours.Array.data[11]' value: objectReference: {fileID: 1376265681} - target: {fileID: 7835481378815030929, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} @@ -23741,19 +23953,19 @@ PrefabInstance: value: 2 objectReference: {fileID: 0} - target: {fileID: 7835481378815030929, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _controllerTurners.Array.data[0] + propertyPath: '_controllerTurners.Array.data[0]' value: objectReference: {fileID: 593080558} - target: {fileID: 7835481378815030929, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _controllerTurners.Array.data[1] + propertyPath: '_controllerTurners.Array.data[1]' value: objectReference: {fileID: 552157265} - target: {fileID: 7835481378815030929, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _locomotionTurners.Array.data[0] + propertyPath: '_locomotionTurners.Array.data[0]' value: objectReference: {fileID: 850809606} - target: {fileID: 7835481378815030929, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} - propertyPath: _locomotionTurners.Array.data[1] + propertyPath: '_locomotionTurners.Array.data[1]' value: objectReference: {fileID: 1324520770} - target: {fileID: 8176185720828943613, guid: 2b6a1257ec0ff284693f68d0ddccbbe8, type: 3} @@ -24034,6 +24246,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: diff --git a/Samples/BodyTrackingSamples/Body/Models/Realistic.json b/Samples/BodyTrackingSamples/Body/Models/Realistic.json index 571c037..3c9ffb7 100644 --- a/Samples/BodyTrackingSamples/Body/Models/Realistic.json +++ b/Samples/BodyTrackingSamples/Body/Models/Realistic.json @@ -21,6 +21,12 @@ } }, "source": { + "format": { + "jointSpaceType": "RootOriginRelative", + "skeletonFlags": { + "noRotationCorrectionOnCoordConversion": true + } + }, "joints": [ "Root", "Hips", diff --git a/Samples/BodyTrackingSamples/Scenes/MovementBody.unity b/Samples/BodyTrackingSamples/Scenes/MovementBody.unity index 0de11e1..103a29b 100644 --- a/Samples/BodyTrackingSamples/Scenes/MovementBody.unity +++ b/Samples/BodyTrackingSamples/Scenes/MovementBody.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 10 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -42,8 +42,8 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -66,6 +66,9 @@ LightmapSettings: m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 @@ -648,7 +651,7 @@ GameObject: m_PrefabAsset: {fileID: 0} --- !u!95 &143901915 Animator: - serializedVersion: 7 + serializedVersion: 5 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -662,7 +665,6 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 - m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 @@ -2099,7 +2101,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!95 &292938543 Animator: - serializedVersion: 7 + serializedVersion: 5 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -2113,7 +2115,6 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 - m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 @@ -2553,9 +2554,6 @@ SkinnedMeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 3 m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -4665,12 +4663,12 @@ MonoBehaviour: m_RequiresColorTexture: 0 m_Version: 2 m_TaaSettings: - m_Quality: 3 - m_FrameInfluence: 0.1 - m_JitterScale: 1 - m_MipBias: 0 - m_VarianceClampScale: 0.9 - m_ContrastAdaptiveSharpening: 0 + quality: 3 + frameInfluence: 0.1 + jitterScale: 1 + mipBias: 0 + varianceClampScale: 0.9 + contrastAdaptiveSharpening: 0 --- !u!1 &763637995 GameObject: m_ObjectHideFlags: 0 @@ -5443,9 +5441,6 @@ SkinnedMeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 3 m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5698,9 +5693,6 @@ SkinnedMeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 3 m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6525,7 +6517,7 @@ MonoBehaviour: m_EditorClassIdentifier: --- !u!95 &1070385752 Animator: - serializedVersion: 7 + serializedVersion: 5 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -6539,7 +6531,6 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 - m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 @@ -6624,9 +6615,6 @@ SkinnedMeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 3 m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7722,6 +7710,90 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1304375840} m_Modifications: + - target: {fileID: 1977992868843437148, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.b + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1977992868843437148, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.g + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 1977992868843437148, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.r + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2317377655739285979, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.b + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2317377655739285979, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.g + value: 0.627451 + objectReference: {fileID: 0} + - target: {fileID: 2317377655739285979, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.r + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 2397455719403067871, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.b + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2397455719403067871, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.g + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 2397455719403067871, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.r + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2882578742073411673, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.b + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2882578742073411673, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.g + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 2882578742073411673, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.r + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3299166892396984584, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.b + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 3299166892396984584, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.g + value: 0.7529412 + objectReference: {fileID: 0} + - target: {fileID: 3299166892396984584, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.r + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3984409020773015259, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.b + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3984409020773015259, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.g + value: 0.627451 + objectReference: {fileID: 0} + - target: {fileID: 3984409020773015259, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColorState.Color.r + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 4275908554054364913, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.b + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 4275908554054364913, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.g + value: 0.7529412 + objectReference: {fileID: 0} + - target: {fileID: 4275908554054364913, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.r + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4755192900336154932, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} propertyPath: m_Name value: SkeletonDebugMenu @@ -7747,11 +7819,11 @@ PrefabInstance: value: 2 objectReference: {fileID: 0} - target: {fileID: 7809587273292597666, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} - propertyPath: '_retargeters.Array.data[0]' + propertyPath: _retargeters.Array.data[0] value: objectReference: {fileID: 1694879731} - target: {fileID: 7809587273292597666, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} - propertyPath: '_retargeters.Array.data[1]' + propertyPath: _retargeters.Array.data[1] value: objectReference: {fileID: 1070385751} - target: {fileID: 7809587273292597666, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} @@ -7759,17 +7831,35 @@ PrefabInstance: value: 2 objectReference: {fileID: 0} - target: {fileID: 7809587273292597666, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} - propertyPath: '_debugDrawTransforms.Array.data[0]' + propertyPath: _debugDrawTransforms.Array.data[0] value: objectReference: {fileID: 3793612932431663494} - target: {fileID: 7809587273292597666, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} - propertyPath: '_debugDrawTransforms.Array.data[1]' + propertyPath: _debugDrawTransforms.Array.data[1] value: objectReference: {fileID: 1898794884} + - target: {fileID: 8614095634679350105, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.b + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8614095634679350105, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.g + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 8614095634679350105, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + propertyPath: _selectColor.r + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 5551647967490619005, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + insertIndex: -1 + addedObject: {fileID: 0} + - targetCorrespondingSourceObject: {fileID: 8592073309893989374, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} + insertIndex: -1 + addedObject: {fileID: 0} - targetCorrespondingSourceObject: {fileID: 7003979803152782586, guid: 2e966a1f5f5dd424298f7abb726ad57f, type: 3} insertIndex: -1 addedObject: {fileID: 0} @@ -8162,8 +8252,9 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1348692262} m_Enabled: 1 - serializedVersion: 11 + serializedVersion: 10 m_Type: 1 + m_Shape: 0 m_Color: {r: 1, g: 0.9137255, b: 0.6745098, a: 1} m_Intensity: 1 m_Range: 10 @@ -8213,12 +8304,8 @@ Light: m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 --- !u!1 &1364086341 GameObject: m_ObjectHideFlags: 0 @@ -8497,12 +8584,12 @@ MonoBehaviour: m_RequiresColorTexture: 0 m_Version: 2 m_TaaSettings: - m_Quality: 3 - m_FrameInfluence: 0.1 - m_JitterScale: 1 - m_MipBias: 0 - m_VarianceClampScale: 0.9 - m_ContrastAdaptiveSharpening: 0 + quality: 3 + frameInfluence: 0.1 + jitterScale: 1 + mipBias: 0 + varianceClampScale: 0.9 + contrastAdaptiveSharpening: 0 --- !u!1 &1402933566 GameObject: m_ObjectHideFlags: 0 @@ -8806,9 +8893,6 @@ SkinnedMeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 3 m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -9935,9 +10019,6 @@ SkinnedMeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 3 m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -10201,6 +10282,42 @@ PrefabInstance: propertyPath: m_LocalPosition.z value: -0.029359024 objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawSourceTPoseColor.g + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawTargetTPoseColor.b + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawTargetTPoseColor.g + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawSourceSkeletonColor.b + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawSourceSkeletonColor.g + value: 0.627451 + objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawSourceSkeletonColor.r + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawTargetSkeletonColor.b + value: 0.5019608 + objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawTargetSkeletonColor.g + value: 0.627451 + objectReference: {fileID: 0} + - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} + propertyPath: _debugDrawTargetSkeletonColor.r + value: 1 + objectReference: {fileID: 0} - target: {fileID: 8156316538343237965, guid: 0e5c330c8ce917042b667b967e11994f, type: 3} propertyPath: _targetProcessorContainers.Array.size value: 1 @@ -11046,7 +11163,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!95 &1765130996 Animator: - serializedVersion: 7 + serializedVersion: 5 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -11060,7 +11177,6 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 - m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 @@ -11687,19 +11803,19 @@ PrefabInstance: value: 2 objectReference: {fileID: 0} - target: {fileID: 2770609752493657844, guid: dd042bb7a7e67464c8a82b2c0a32c07c, type: 3} - propertyPath: '_animators.Array.data[0]' + propertyPath: _animators.Array.data[0] value: objectReference: {fileID: 143901915} - target: {fileID: 2770609752493657844, guid: dd042bb7a7e67464c8a82b2c0a32c07c, type: 3} - propertyPath: '_animators.Array.data[1]' + propertyPath: _animators.Array.data[1] value: objectReference: {fileID: 1070385752} - target: {fileID: 2770609752493657844, guid: dd042bb7a7e67464c8a82b2c0a32c07c, type: 3} - propertyPath: '_retargeters.Array.data[0]' + propertyPath: _retargeters.Array.data[0] value: objectReference: {fileID: 1694879731} - target: {fileID: 2770609752493657844, guid: dd042bb7a7e67464c8a82b2c0a32c07c, type: 3} - propertyPath: '_retargeters.Array.data[1]' + propertyPath: _retargeters.Array.data[1] value: objectReference: {fileID: 1070385751} - target: {fileID: 4563516835585250313, guid: dd042bb7a7e67464c8a82b2c0a32c07c, type: 3} @@ -12286,6 +12402,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 7900374807858456000, guid: d13bc4c12718d2a4f9222b0d93dd09f0, type: 3} insertIndex: -1 addedObject: {fileID: 0} + - targetCorrespondingSourceObject: {fileID: 7318200754736735173, guid: d13bc4c12718d2a4f9222b0d93dd09f0, type: 3} + insertIndex: -1 + addedObject: {fileID: 0} - targetCorrespondingSourceObject: {fileID: 8132985355333327063, guid: d13bc4c12718d2a4f9222b0d93dd09f0, type: 3} insertIndex: -1 addedObject: {fileID: 0} @@ -12644,8 +12763,9 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2076536254} m_Enabled: 1 - serializedVersion: 11 + serializedVersion: 10 m_Type: 1 + m_Shape: 0 m_Color: {r: 1, g: 0.9137255, b: 0.6745098, a: 1} m_Intensity: 1 m_Range: 10 @@ -12695,12 +12815,8 @@ Light: m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 --- !u!4 &2076536256 Transform: m_ObjectHideFlags: 0 @@ -12846,8 +12962,9 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2090686045} m_Enabled: 1 - serializedVersion: 11 + serializedVersion: 10 m_Type: 0 + m_Shape: 0 m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 2.72 m_Range: 4.34 @@ -12897,12 +13014,8 @@ Light: m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 --- !u!4 &2090686047 Transform: m_ObjectHideFlags: 0 @@ -12958,8 +13071,9 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2094724098} m_Enabled: 1 - serializedVersion: 11 + serializedVersion: 10 m_Type: 1 + m_Shape: 0 m_Color: {r: 0.4406075, g: 0.66101205, b: 0.8867924, a: 1} m_Intensity: 1.47 m_Range: 10 @@ -13009,12 +13123,8 @@ Light: m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 --- !u!1 &2099202519 GameObject: m_ObjectHideFlags: 0 @@ -13200,12 +13310,12 @@ MonoBehaviour: m_RequiresColorTexture: 0 m_Version: 2 m_TaaSettings: - m_Quality: 3 - m_FrameInfluence: 0.1 - m_JitterScale: 1 - m_MipBias: 0 - m_VarianceClampScale: 0.9 - m_ContrastAdaptiveSharpening: 0 + quality: 3 + frameInfluence: 0.1 + jitterScale: 1 + mipBias: 0 + varianceClampScale: 0.9 + contrastAdaptiveSharpening: 0 --- !u!1 &2108881433 GameObject: m_ObjectHideFlags: 0 @@ -14553,19 +14663,19 @@ PrefabInstance: value: 2 objectReference: {fileID: 0} - target: {fileID: 6229825607387579040, guid: 1ae7b04c503f51c48ad2f60c89da8f0b, type: 3} - propertyPath: '_ovrBodies.Array.data[0]' + propertyPath: _ovrBodies.Array.data[0] value: objectReference: {fileID: 1538582923} - target: {fileID: 6229825607387579040, guid: 1ae7b04c503f51c48ad2f60c89da8f0b, type: 3} - propertyPath: '_ovrBodies.Array.data[1]' + propertyPath: _ovrBodies.Array.data[1] value: objectReference: {fileID: 1070385753} - target: {fileID: 6229825607387579040, guid: 1ae7b04c503f51c48ad2f60c89da8f0b, type: 3} - propertyPath: '_retargeters.Array.data[0]' + propertyPath: _retargeters.Array.data[0] value: objectReference: {fileID: 1694879731} - target: {fileID: 6229825607387579040, guid: 1ae7b04c503f51c48ad2f60c89da8f0b, type: 3} - propertyPath: '_retargeters.Array.data[1]' + propertyPath: _retargeters.Array.data[1] value: objectReference: {fileID: 1070385751} m_RemovedComponents: [] @@ -15505,11 +15615,11 @@ PrefabInstance: value: 2 objectReference: {fileID: 0} - target: {fileID: 7299867050467235174, guid: 817b9eb0478b6a047a01cf5f1ba7f8a6, type: 3} - propertyPath: '_characters.Array.data[0]' + propertyPath: _characters.Array.data[0] value: objectReference: {fileID: 1694879730} - target: {fileID: 7299867050467235174, guid: 817b9eb0478b6a047a01cf5f1ba7f8a6, type: 3} - propertyPath: '_characters.Array.data[1]' + propertyPath: _characters.Array.data[1] value: objectReference: {fileID: 142418668} - target: {fileID: 7299867050467235174, guid: 817b9eb0478b6a047a01cf5f1ba7f8a6, type: 3} @@ -15517,11 +15627,11 @@ PrefabInstance: value: 2 objectReference: {fileID: 0} - target: {fileID: 7299867050467235174, guid: 817b9eb0478b6a047a01cf5f1ba7f8a6, type: 3} - propertyPath: '_mirroredCharacters.Array.data[0]' + propertyPath: _mirroredCharacters.Array.data[0] value: objectReference: {fileID: 3793612932431663495} - target: {fileID: 7299867050467235174, guid: 817b9eb0478b6a047a01cf5f1ba7f8a6, type: 3} - propertyPath: '_mirroredCharacters.Array.data[1]' + propertyPath: _mirroredCharacters.Array.data[1] value: objectReference: {fileID: 1898795011} m_RemovedComponents: [] diff --git a/Shared/Data/Armature-Pose.json b/Shared/Data/Armature-Pose.json index 6868b54..7a96e0e 100644 --- a/Shared/Data/Armature-Pose.json +++ b/Shared/Data/Armature-Pose.json @@ -21,6 +21,12 @@ } }, "source": { + "format": { + "jointSpaceType": "RootOriginRelative", + "skeletonFlags": { + "noRotationCorrectionOnCoordConversion": true + } + }, "joints": [ "Root", "Hips", @@ -6377,4 +6383,4 @@ } } } -} \ No newline at end of file +} diff --git a/Shared/Prefabs/UI/SkeletonDebugMenu.prefab b/Shared/Prefabs/UI/SkeletonDebugMenu.prefab index 3a82a30..2d78f50 100644 --- a/Shared/Prefabs/UI/SkeletonDebugMenu.prefab +++ b/Shared/Prefabs/UI/SkeletonDebugMenu.prefab @@ -31,6 +31,8 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1392910777745800631} + - {fileID: 6859675002741368054} + - {fileID: 7278997171780845941} - {fileID: 8289507325000287857} - {fileID: 7604810475940913570} - {fileID: 3152222361124473503} @@ -48,8 +50,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 037ec887f1d0f18469be7e9105a96cfd, type: 3} m_Name: m_EditorClassIdentifier: - _debugDrawTransform: {fileID: 0} + _debugDrawTransforms: [] _retargeters: [] + _toggleSourceButton: 0 + _toggleTargetButton: 0 + _toggleSourceTPoseButton: 0 + _toggleTargetTPoseButton: 0 --- !u!1 &8751418975657857256 GameObject: m_ObjectHideFlags: 0 @@ -77,8 +83,8 @@ Transform: m_GameObject: {fileID: 8751418975657857256} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0.075, z: 0.015} - m_LocalScale: {x: 0.206, y: 0.25, z: 1} + m_LocalPosition: {x: 0, y: 0.141, z: 0.015} + m_LocalScale: {x: 0.206, y: 0.4, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4755192900336154934} @@ -143,7 +149,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.size - value: 4 + value: 6 objectReference: {fileID: 0} - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Mode @@ -157,6 +163,14 @@ PrefabInstance: propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[3].m_Mode value: 1 objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[4].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[5].m_Mode + value: 1 + objectReference: {fileID: 0} - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Target value: @@ -169,6 +183,14 @@ PrefabInstance: propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[3].m_Target value: objectReference: {fileID: 2317377655739285979} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[4].m_Target + value: + objectReference: {fileID: 8614095634679350105} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[5].m_Target + value: + objectReference: {fileID: 2882578742073411673} - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_CallState value: 2 @@ -181,6 +203,14 @@ PrefabInstance: propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[3].m_CallState value: 2 objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[4].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[5].m_CallState + value: 2 + objectReference: {fileID: 0} - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName value: ClearSkeletonDraw @@ -193,6 +223,14 @@ PrefabInstance: propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[3].m_MethodName value: DeselectIcon objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[4].m_MethodName + value: DeselectIcon + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[5].m_MethodName + value: DeselectIcon + objectReference: {fileID: 0} - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName value: Meta.XR.Movement.Samples.MovementDebugDrawSkeleton, Meta.XR.Movement.Samples @@ -205,6 +243,14 @@ PrefabInstance: propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[3].m_TargetAssemblyTypeName value: Meta.XR.Movement.Samples.MovementToggleIcon, Meta.XR.Movement.Samples objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[4].m_TargetAssemblyTypeName + value: Meta.XR.Movement.Samples.MovementToggleIcon, Meta.XR.Movement.Samples + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[5].m_TargetAssemblyTypeName + value: Meta.XR.Movement.Samples.MovementToggleIcon, Meta.XR.Movement.Samples + objectReference: {fileID: 0} - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName value: UnityEngine.Object, UnityEngine @@ -217,6 +263,14 @@ PrefabInstance: propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[3].m_Arguments.m_ObjectArgumentAssemblyTypeName value: UnityEngine.Object, UnityEngine objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[4].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[5].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} - target: {fileID: 4171210596153234762, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} propertyPath: m_Name value: ClearDraw @@ -695,3 +749,387 @@ MonoBehaviour: _toggleRenderer: {fileID: 4679097708929008865} _selectColor: {r: 0.3019608, g: 0.64705884, b: 0.9529412, a: 0.78431374} _deselectColor: {r: 1, g: 1, b: 1, a: 0.39215687} +--- !u!1001 &6694368519529501758 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 4755192900336154934} + m_Modifications: + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.size + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Target + value: + objectReference: {fileID: 7809587273292597666} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_Target + value: + objectReference: {fileID: 2882578742073411673} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName + value: ToggleTargetTPoseDraw + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName + value: ToggleSelectIcon + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName + value: Meta.XR.Movement.Samples.MovementDebugDrawSkeletonMenu, Meta.XR.Movement.Samples + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_TargetAssemblyTypeName + value: Meta.XR.Movement.Samples.MovementToggleIcon, Meta.XR.Movement.Samples + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234762, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_Name + value: DrawTargetTPose + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalScale.x + value: 0.05 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalScale.y + value: 0.050000004 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalScale.z + value: 0.050000004 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalPosition.y + value: 0.21 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_text + value: 'Draw Target + + T-Pose' + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontSize + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontColor.b + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontColor.g + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontColor.r + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontSizeBase + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontColor32.rgba + value: 4278190080 + objectReference: {fileID: 0} + - target: {fileID: 9052892711818005985, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4171210596153234762, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + insertIndex: -1 + addedObject: {fileID: 2882578742073411673} + m_SourcePrefab: {fileID: 100100000, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} +--- !u!23 &5504235585096410166 stripped +MeshRenderer: + m_CorrespondingSourceObject: {fileID: 1190592599872860168, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + m_PrefabInstance: {fileID: 6694368519529501758} + m_PrefabAsset: {fileID: 0} +--- !u!1 &7278997171780845940 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4171210596153234762, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + m_PrefabInstance: {fileID: 6694368519529501758} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2882578742073411673 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7278997171780845940} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ced2523c6ddfd264f996021ac660069d, type: 3} + m_Name: + m_EditorClassIdentifier: + _toggleRenderer: {fileID: 5504235585096410166} + _selectColor: {r: 0.3019608, g: 0.64705884, b: 0.9529412, a: 0.78431374} + _deselectColor: {r: 1, g: 1, b: 1, a: 0.39215687} +--- !u!4 &7278997171780845941 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + m_PrefabInstance: {fileID: 6694368519529501758} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &7408821599828816317 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 4755192900336154934} + m_Modifications: + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.size + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Target + value: + objectReference: {fileID: 7809587273292597666} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_Target + value: + objectReference: {fileID: 8614095634679350105} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName + value: ToggleSourceTPoseDraw + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName + value: ToggleSelectIcon + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName + value: Meta.XR.Movement.Samples.MovementDebugDrawSkeletonMenu, Meta.XR.Movement.Samples + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_TargetAssemblyTypeName + value: Meta.XR.Movement.Samples.MovementToggleIcon, Meta.XR.Movement.Samples + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 3718601612112823234, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: _whenRelease.m_PersistentCalls.m_Calls.Array.data[2].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234762, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_Name + value: DrawSourceTPose + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalScale.x + value: 0.05 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalScale.y + value: 0.050000004 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalScale.z + value: 0.050000004 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalPosition.y + value: 0.28 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_text + value: 'Draw Source + + T-Pose' + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontSize + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontColor.b + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontColor.g + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontColor.r + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontSizeBase + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 6198825956437652943, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_fontColor32.rgba + value: 4278190080 + objectReference: {fileID: 0} + - target: {fileID: 9052892711818005985, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4171210596153234762, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + insertIndex: -1 + addedObject: {fileID: 8614095634679350105} + m_SourcePrefab: {fileID: 100100000, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} +--- !u!4 &6859675002741368054 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4171210596153234763, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + m_PrefabInstance: {fileID: 7408821599828816317} + m_PrefabAsset: {fileID: 0} +--- !u!1 &6859675002741368055 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4171210596153234762, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + m_PrefabInstance: {fileID: 7408821599828816317} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8614095634679350105 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6859675002741368055} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ced2523c6ddfd264f996021ac660069d, type: 3} + m_Name: + m_EditorClassIdentifier: + _toggleRenderer: {fileID: 8526649265016586677} + _selectColor: {r: 0.3019608, g: 0.64705884, b: 0.9529412, a: 0.78431374} + _deselectColor: {r: 1, g: 1, b: 1, a: 0.39215687} +--- !u!23 &8526649265016586677 stripped +MeshRenderer: + m_CorrespondingSourceObject: {fileID: 1190592599872860168, guid: b5bf7591ff238a744801f41e9e04ae8a, type: 3} + m_PrefabInstance: {fileID: 7408821599828816317} + m_PrefabAsset: {fileID: 0} diff --git a/Shared/Scripts/UI/MovementDebugDrawSkeletonMenu.cs b/Shared/Scripts/UI/MovementDebugDrawSkeletonMenu.cs index 02f183b..97f4bbb 100644 --- a/Shared/Scripts/UI/MovementDebugDrawSkeletonMenu.cs +++ b/Shared/Scripts/UI/MovementDebugDrawSkeletonMenu.cs @@ -23,6 +23,12 @@ public class MovementDebugDrawSkeletonMenu : MonoBehaviour [SerializeField, InspectorButton("ToggleTargetSkeletonDraw")] private bool _toggleTargetButton; + [SerializeField, InspectorButton("ToggleSourceTPoseDraw")] + private bool _toggleSourceTPoseButton; + + [SerializeField, InspectorButton("ToggleTargetTPoseDraw")] + private bool _toggleTargetTPoseButton; + private void Awake() { Assert.IsTrue(_retargeters is { Length: > 0 }); @@ -56,12 +62,30 @@ public void ToggleTargetSkeletonDraw() } } + public void ToggleSourceTPoseDraw() + { + foreach (var retargeter in _retargeters) + { + retargeter.DebugDrawSourceTPose = !retargeter.DebugDrawSourceTPose; + } + } + + public void ToggleTargetTPoseDraw() + { + foreach (var retargeter in _retargeters) + { + retargeter.DebugDrawTargetTPose = !retargeter.DebugDrawTargetTPose; + } + } + public void ClearSkeletonDraw() { foreach (var retargeter in _retargeters) { retargeter.DebugDrawSourceSkeleton = false; retargeter.DebugDrawTargetSkeleton = false; + retargeter.DebugDrawSourceTPose = false; + retargeter.DebugDrawTargetTPose = false; } } } diff --git a/package.json b/package.json index 2ca3f30..a048ca4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.meta.xr.sdk.movement", "displayName": "Meta XR Movement SDK", - "version": "83.0.0", + "version": "201.0.0", "unity": "2022.3", "unityRelease": "15f1", "keywords": [ @@ -9,7 +9,6 @@ "Oculus", "Movement", "Retargeting", - "AI", "SDK", "OVR", "Samples"