[IKFixes] Messy attempt at fixing animation bleeding

This fixes animations bleeding through FBT, mainly the chest and knee trackers would violently shake when moving.

Also includes some testing changes to elbow target offset position. This makes it work much better using Standable but a bit weird with real trackers. Configurable offset distance like IKTweaks is likely needed.
This commit is contained in:
NotAKidoS 2023-05-11 08:45:57 -05:00
parent c7b16abd4f
commit 00166151f1
2 changed files with 170 additions and 60 deletions

View file

@ -22,11 +22,18 @@ 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<bool> EntryAssignRemainingTrackers =
Category.CreateEntry("Assign Remaining Trackers", true, description: "Should the game calibrate any additional trackers as secondary trackers for already-tracked points?");
public static readonly MelonPreferences_Entry<bool> EntryAltElbowDirection =
Category.CreateEntry("Alt Elbow Direction", true, description: "Should bodyRotation be reset to identity when muscleupdate happens? Should fix chest tracking & tpose while running.");
public override void OnInitializeMelon()
{
ApplyPatches(typeof(HarmonyPatches.VRIKPatches));
ApplyPatches(typeof(HarmonyPatches.BodySystemPatches));
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
ApplyPatches(typeof(HarmonyPatches.IKSystemPatches));
}
void ApplyPatches(Type type)