From 1921c7b782867be1b4aeacf1ff0281c55797e8b5 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Tue, 18 Apr 2023 03:53:46 -0500 Subject: [PATCH] Fix emote offset issue. --- DesktopVRIK/DesktopVRIKSystem.cs | 15 ++++++++------- DesktopVRIK/format.json | 6 +++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/DesktopVRIK/DesktopVRIKSystem.cs b/DesktopVRIK/DesktopVRIKSystem.cs index 479384c..81d0896 100644 --- a/DesktopVRIK/DesktopVRIKSystem.cs +++ b/DesktopVRIK/DesktopVRIKSystem.cs @@ -208,6 +208,7 @@ internal class DesktopVRIKSystem : MonoBehaviour HandleLocomotionTracking(); UpdateLocomotionWeight(); ApplyBodySystemWeights(); + ResetAvatarLocalPosition(); } void HandleLocomotionTracking() @@ -306,6 +307,13 @@ internal class DesktopVRIKSystem : MonoBehaviour } } + void ResetAvatarLocalPosition() + { + // Reset avatar offset + avatarTransform.localPosition = Vector3.zero; + avatarTransform.localRotation = Quaternion.identity; + } + public void OnSetupAvatarDesktop() { if (!Setting_Enabled) return; @@ -382,13 +390,6 @@ internal class DesktopVRIKSystem : MonoBehaviour public void OnPreSolverUpdate() { - // Reset avatar offset - avatarTransform.localPosition = Vector3.zero; - avatarTransform.localRotation = Quaternion.identity; - - // Don't run during emotes - if (_ikEmotePlaying) return; - // Set plant feet avatarIKSolver.plantFeet = Setting_PlantFeet; diff --git a/DesktopVRIK/format.json b/DesktopVRIK/format.json index 734b967..8075692 100644 --- a/DesktopVRIK/format.json +++ b/DesktopVRIK/format.json @@ -1,7 +1,7 @@ { "_id": 117, "name": "DesktopVRIK", - "modversion": "4.1.6", + "modversion": "4.1.7", "gameversion": "2022r170", "loaderversion": "0.5.7", "modtype": "Mod", @@ -17,8 +17,8 @@ "requirements": [ "BTKUILib" ], - "downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/DesktopVRIK-v4.1.6/DesktopVRIK.dll", + "downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r1/DesktopVRIK.dll", "sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/", - "changelog": "- Enable useAnimatedBendNormal when Locomotion tracking is disabled. This fixes some sitting animations that bend at unnatural angles.", + "changelog": "- Enable useAnimatedBendNormal when Locomotion tracking is disabled. This fixes some sitting animations that bend at unnatural angles.\n- Fix avatar root offset not being reset when entering/playing emotes.", "embedcolor": "9b59b6" } \ No newline at end of file