From 41068ce3fb0154d949dcb342f9f60edc71e1e69d Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Sat, 14 Jan 2023 02:52:08 -0600 Subject: [PATCH] why is it fucking (literally() fucking one line --- DesktopVRIK/DesktopVRIK.cs | 15 ++++++++++++--- DesktopVRIK/HarmonyPatches.cs | 1 - DesktopVRIK/Properties/AssemblyInfo.cs | 2 +- DesktopVRIK/format.json | 6 +++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/DesktopVRIK/DesktopVRIK.cs b/DesktopVRIK/DesktopVRIK.cs index 9af0386..ab82ebd 100644 --- a/DesktopVRIK/DesktopVRIK.cs +++ b/DesktopVRIK/DesktopVRIK.cs @@ -18,6 +18,7 @@ public class DesktopVRIK : MonoBehaviour Setting_EmoteVRIK, Setting_EmoteLookAtIK; public static float Setting_EmulateVRChatHipMovementWeight; + public static float Setting_HipThrustMultiplier = 0.1f; public Transform viewpoint; public Vector3 initialCamPos; @@ -60,12 +61,15 @@ public class DesktopVRIK : MonoBehaviour IKSystem.vrik.transform.localPosition = Vector3.zero; IKSystem.vrik.transform.localRotation = Quaternion.identity; + float movementVector = (1 - MovementSystem.Instance.movementVector.magnitude); + IKSystem.vrik.solver.spine.positionWeight = Setting_HipThrustMultiplier * movementVector; + //VRChat hip movement emulation if (Setting_EmulateVRChatHipMovementWeight != 0) { float angle = PlayerSetup.Instance.desktopCamera.transform.localEulerAngles.x; if (angle > 180) angle -= 360; - float leanAmount = angle * (1 - MovementSystem.Instance.movementVector.magnitude) * Setting_EmulateVRChatHipMovementWeight; + float leanAmount = angle * movementVector * Setting_EmulateVRChatHipMovementWeight; Quaternion rotation = Quaternion.AngleAxis(leanAmount, IKSystem.Instance.avatar.transform.right); IKSystem.vrik.solver.AddRotationOffset(IKSolverVR.RotationOffset.Head, rotation); } @@ -110,9 +114,13 @@ public class DesktopVRIK : MonoBehaviour vrik.solver.locomotion.angleThreshold = 30f; vrik.solver.locomotion.maxLegStretch = 0.75f; //nuke weights - vrik.solver.spine.headClampWeight = 0f; + vrik.solver.spine.headClampWeight = 1f; vrik.solver.spine.minHeadHeight = 0f; - //vrik.solver.spine.pelvisPositionWeight = 0f; + + //calm ur ass + vrik.solver.spine.positionWeight = 0.1f; + + vrik.solver.spine.pelvisPositionWeight = 0f; vrik.solver.leftArm.positionWeight = 0f; vrik.solver.leftArm.rotationWeight = 0f; vrik.solver.rightArm.positionWeight = 0f; @@ -128,6 +136,7 @@ public class DesktopVRIK : MonoBehaviour BodySystem.TrackingRightArmEnabled = false; BodySystem.TrackingLeftLegEnabled = false; BodySystem.TrackingRightLegEnabled = false; + BodySystem.TrackingPositionWeight = 0f; IKSystem.Instance.headAnchorRotationOffset = Vector3.zero; IKSystem.Instance.headAnchorPositionOffset = Vector3.zero; diff --git a/DesktopVRIK/HarmonyPatches.cs b/DesktopVRIK/HarmonyPatches.cs index 9a00ec2..c32f443 100644 --- a/DesktopVRIK/HarmonyPatches.cs +++ b/DesktopVRIK/HarmonyPatches.cs @@ -105,7 +105,6 @@ class IKSystemPatches { if (IKSystem.Instance.animator != null && IKSystem.Instance.animator.avatar != null && IKSystem.Instance.animator.avatar.isHuman) { - //why the fuck does this fix bad armatures and heels in ground ??? (this one is suprisingly not because of Default Robot Kyle) ... (Fuck you Default Robot Kyle) if (____poseHandler == null) { ____poseHandler = new HumanPoseHandler(IKSystem.Instance.animator.avatar, IKSystem.Instance.animator.transform); diff --git a/DesktopVRIK/Properties/AssemblyInfo.cs b/DesktopVRIK/Properties/AssemblyInfo.cs index 80bd77c..d04ea4d 100644 --- a/DesktopVRIK/Properties/AssemblyInfo.cs +++ b/DesktopVRIK/Properties/AssemblyInfo.cs @@ -26,6 +26,6 @@ using System.Reflection; namespace DesktopVRIK.Properties; internal static class AssemblyInfoParams { - public const string Version = "2.0.1"; + public const string Version = "2.0.2"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/DesktopVRIK/format.json b/DesktopVRIK/format.json index b7d981d..d145c52 100644 --- a/DesktopVRIK/format.json +++ b/DesktopVRIK/format.json @@ -1,7 +1,7 @@ { "_id": 117, "name": "DesktopVRIK", - "modversion": "2.0.1", + "modversion": "2.0.2", "gameversion": "2022r170", "loaderversion": "0.5.7", "modtype": "Mod", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidOnSteam/DesktopVRIK/releases/download/v2.0.1/DesktopVRIK.dll", + "downloadlink": "https://github.com/NotAKidOnSteam/DesktopVRIK/releases/download/v2.0.2/DesktopVRIK.dll", "sourcelink": "https://github.com/NotAKidOnSteam/DesktopVRIK/", - "changelog": "- Simplified VRIK calibration to avoid low heel issue.\n- Added checks for valid Humanoid rigs.\n- Added PlantFeet & EnforceViewPosition Settings.\n- Added Weight option for the VRChat-like hip movement.\n- Simplified config, added BTKUILib support.\n- Reworked calibration to support almost every avatar.\n- Added custom avatar-defined IKPose support.", + "changelog": "- Fixed butt from slipping out underneath you and thrusting when leaning.\n- Fixed VRIK bleeding into locomotion animations.", "embedcolor": "9b59b6" } \ No newline at end of file