[IKFixes] shit fixes

This commit is contained in:
NotAKidoS 2023-06-02 16:37:05 -05:00
parent c69877b41d
commit 6e262bac1b
4 changed files with 24 additions and 8 deletions

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk"/>

View file

@ -156,6 +156,11 @@ internal static class BodySystemPatches
solver.spine.neckStiffness = IKFixes.EntryNeckStiffness.Value;
solver.spine.bodyRotStiffness = IKFixes.EntryBodyRotStiffness.Value;
solver.spine.rotateChestByHands = IKFixes.EntryRotateChestByHands.Value;
if (!IKSystem.vrik.solver.leftLeg.usingKneeTracker)
IKSystem.vrik.solver.leftLeg.bendToTargetWeight = IKFixes.EntryBendToTargetWeight.Value;
if (!IKSystem.vrik.solver.rightLeg.usingKneeTracker)
IKSystem.vrik.solver.rightLeg.bendToTargetWeight = IKFixes.EntryBendToTargetWeight.Value;
}
int count = IKSystem.Instance.AllTrackingPoints.FindAll((TrackingPoint m) => m.isActive && m.isValid && m.suggestedRole > TrackingPoint.TrackingRole.Invalid).Count;
@ -230,10 +235,16 @@ internal static class BodySystemPatches
{
IKSystem.Instance.applyOriginalHipPosition = false;
IKSystem.Instance.applyOriginalHipRotation = false;
IKSystem.vrik.solver.leftLeg.bendToTargetWeight = 0f;
IKSystem.vrik.solver.rightLeg.bendToTargetWeight = 0f;
IKSystem.vrik.solver.leftLeg.bendGoalWeight = 1f;
IKSystem.vrik.solver.rightLeg.bendGoalWeight = 1f;
if (IKSystem.vrik.solver.leftLeg.usingKneeTracker)
{
IKSystem.vrik.solver.leftLeg.bendToTargetWeight = 0f;
IKSystem.vrik.solver.leftLeg.bendGoalWeight = 1f;
}
if (IKSystem.vrik.solver.rightLeg.usingKneeTracker)
{
IKSystem.vrik.solver.rightLeg.bendToTargetWeight = 0f;
IKSystem.vrik.solver.rightLeg.bendGoalWeight = 1f;
}
}
}

View file

@ -22,6 +22,9 @@ public class IKFixes : MelonMod
public static readonly MelonPreferences_Entry<float> EntryRotateChestByHands =
Category.CreateEntry("Rot Chest By Hands", 1f, description: "Rotate chest by hands.");
public static readonly MelonPreferences_Entry<float> EntryBendToTargetWeight =
Category.CreateEntry("Leg Bend To Target", 1f, description: "Leg bend to target weight");
public static readonly MelonPreferences_Entry<bool> EntryAssignRemainingTrackers =
Category.CreateEntry("Assign Remaining Trackers", true, description: "Should the game calibrate any additional trackers as secondary trackers for already-tracked points?");

View file

@ -1,7 +1,7 @@
{
"_id": 142,
"name": "IKFixes",
"modversion": "1.0.4",
"modversion": "1.0.6",
"gameversion": "2022r170",
"loaderversion": "0.5.7",
"modtype": "Mod",
@ -16,8 +16,8 @@
"requirements": [
"None"
],
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r5/IKFixes.dll",
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r8/IKFixes.dll",
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/IKFixes/",
"changelog": "- Added fix for animations affecting root to bleed into IK. This fixes chest tracker flailing around when running.\n- Added fix to use an IKPose after HalfbodyIK Initialization. This fixes feet pointing upward in halfbody.\n- Fixed patch to leg solver that prevented lower leg rotation while using knee trackers.\n- Adjusted elbow target offsets for a balance between accuracy and stability. Makes StandableFBE-tracked elbows feel much better to use.\n- Added option to disable AssignRemainingTrackers feature.",
"changelog": "- Added fix for animations affecting root to bleed into IK.\n- Use an IKPose after HalfbodyIK Initialization.\n- Fixed patch to leg solver that prevented lower leg rotation while using knee trackers.\n- Adjusted elbow target offsets for a balance between accuracy and stability. Makes StandableFBE-tracked elbows feel much better to use.\n- Added option to disable AssignRemainingTrackers feature.\n- Exposed a couple VRIK solver settings for more fine-tuning.",
"embedcolor": "f46e49"
}