From f2f7874ffe0fdbb0b71c452bc2425728f7ca3af0 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 21:48:17 -0500 Subject: [PATCH 01/24] Initial commit --- .gitattributes | 2 + .gitignore | 398 +++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 21 +++ README.md | 2 + 4 files changed, 423 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..426d76d --- /dev/null +++ b/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4480281 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 NotAKidoS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c8879ef --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# KneeFix + simple fix to knee tracking From bf1dbf5e0150412d1748600afd1941b794f9d827 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 21:51:13 -0500 Subject: [PATCH 02/24] initial release --- KneeFix/HarmonyPatches.cs | 92 ++++++++++++++++++++++++++++++ KneeFix/KneeFix.csproj | 71 +++++++++++++++++++++++ KneeFix/KneeFix.sln | 25 ++++++++ KneeFix/Main.cs | 25 ++++++++ KneeFix/Properties/AssemblyInfo.cs | 30 ++++++++++ KneeFix/format.json | 23 ++++++++ 6 files changed, 266 insertions(+) create mode 100644 KneeFix/HarmonyPatches.cs create mode 100644 KneeFix/KneeFix.csproj create mode 100644 KneeFix/KneeFix.sln create mode 100644 KneeFix/Main.cs create mode 100644 KneeFix/Properties/AssemblyInfo.cs create mode 100644 KneeFix/format.json diff --git a/KneeFix/HarmonyPatches.cs b/KneeFix/HarmonyPatches.cs new file mode 100644 index 0000000..d458035 --- /dev/null +++ b/KneeFix/HarmonyPatches.cs @@ -0,0 +1,92 @@ +using ABI_RC.Systems.IK; +using ABI_RC.Systems.IK.SubSystems; +using HarmonyLib; +using RootMotion.FinalIK; +using UnityEngine; + +namespace NAK.Melons.KneeFix.HarmonyPatches; + +internal static class BodySystemPatches +{ + [HarmonyPostfix] + [HarmonyPatch(typeof(BodySystem), "SetupOffsets")] + private static void Postfix_BodySystem_SetupOffsets(List trackingPoints) + { + //redo offsets for knees as native is too far from pivot + foreach (TrackingPoint trackingPoint in trackingPoints) + { + Transform parent = null; + if (trackingPoint.assignedRole == TrackingPoint.TrackingRole.LeftKnee) + { + parent = IKSystem.vrik.references.leftCalf; + } + else if (trackingPoint.assignedRole == TrackingPoint.TrackingRole.RightKnee) + { + parent = IKSystem.vrik.references.rightCalf; + } + + if (parent != null) + { + trackingPoint.offsetTransform.parent = parent; + trackingPoint.offsetTransform.localPosition = Vector3.zero; + trackingPoint.offsetTransform.localRotation = Quaternion.identity; + trackingPoint.offsetTransform.parent = trackingPoint.referenceTransform; + + Vector3 b = IKSystem.vrik.references.root.forward * 0.5f; + trackingPoint.offsetTransform.position += b; + } + } + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(BodySystem), "Update")] + private static void Postfix_BodySystem_Update() + { + // FBT needs avatar root to follow head + if (IKSystem.vrik != null) + IKSystem.vrik.solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 180f; + } +} + +internal static class VRIKPatches +{ + /** + Leg solver uses virtual bone calf and foot, plus world tracked knee position for normal maths. + This breaks as you playspace up, because calf and foot position aren't offset yet in solve order. + **/ + + [HarmonyPrefix] + [HarmonyPatch(typeof(IKSolverVR.Leg), "ApplyOffsets")] + private static bool Prefix_IKSolverVR_Leg_ApplyOffsets(ref IKSolverVR.Leg __instance) + { + //This is the second part of the above fix, preventing the solver from calculating a bad bendNormal + //when it doesn't need to. The knee tracker should dictate the bendNormal completely. + + if (__instance.usingKneeTracker) + { + __instance.ApplyPositionOffset(__instance.footPositionOffset, 1f); + __instance.ApplyRotationOffset(__instance.footRotationOffset, 1f); + Quaternion quaternion = Quaternion.FromToRotation(__instance.footPosition - __instance.position, __instance.footPosition + __instance.heelPositionOffset - __instance.position); + __instance.footPosition = __instance.position + quaternion * (__instance.footPosition - __instance.position); + __instance.footRotation = quaternion * __instance.footRotation; + return false; + } + + // run full method like normal otherwise + float num = __instance.bendGoalWeight; + __instance.bendGoalWeight = 0f; + __instance.ApplyOffsetsOld(); + __instance.bendGoalWeight = num; + return false; + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(IKSolverVR.Leg), "Solve")] + private static void Prefix_IKSolverVR_Leg_Solve(ref IKSolverVR.Leg __instance) + { + //Turns out VRIK applies bend goal maths before root is offset in solving process. + //We will apply ourselves before then to fix it. + if (__instance.usingKneeTracker) + __instance.ApplyBendGoal(); + } +} \ No newline at end of file diff --git a/KneeFix/KneeFix.csproj b/KneeFix/KneeFix.csproj new file mode 100644 index 0000000..6abdb17 --- /dev/null +++ b/KneeFix/KneeFix.csproj @@ -0,0 +1,71 @@ + + + + + netstandard2.1 + enable + latest + false + True + + + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\0Harmony.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Assembly-CSharp.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Assembly-CSharp-firstpass.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Aura2_Core.dll + + + ..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\BTKUILib.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\cohtml.Net.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Cohtml.Runtime.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\MelonLoader.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\SteamVR.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Unity.Postprocessing.Runtime.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\Unity.TextMeshPro.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.AnimationModule.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.CoreModule.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.InputLegacyModule.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.PhysicsModule.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.VRModule.dll + + + C:\Users\krist\Documents\GitHub\_ChilloutVR Modding\_ManagedLibs\UnityEngine.XRModule.dll + + + + + + + + + diff --git a/KneeFix/KneeFix.sln b/KneeFix/KneeFix.sln new file mode 100644 index 0000000..8e3517d --- /dev/null +++ b/KneeFix/KneeFix.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32630.192 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KneeFix", "KneeFix.csproj", "{EF74B9F3-3891-4884-A8E1-B1BEE38E1803}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EF74B9F3-3891-4884-A8E1-B1BEE38E1803}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF74B9F3-3891-4884-A8E1-B1BEE38E1803}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF74B9F3-3891-4884-A8E1-B1BEE38E1803}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF74B9F3-3891-4884-A8E1-B1BEE38E1803}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {57B73DF6-AE94-4453-AE6D-CC87E6DE9B97} + EndGlobalSection +EndGlobal diff --git a/KneeFix/Main.cs b/KneeFix/Main.cs new file mode 100644 index 0000000..816a050 --- /dev/null +++ b/KneeFix/Main.cs @@ -0,0 +1,25 @@ +using MelonLoader; + +namespace NAK.Melons.KneeFix; + +public class KneeFixMod : MelonMod +{ + public override void OnInitializeMelon() + { + ApplyPatches(typeof(HarmonyPatches.BodySystemPatches)); + ApplyPatches(typeof(HarmonyPatches.VRIKPatches)); + } + + void ApplyPatches(Type type) + { + try + { + HarmonyInstance.PatchAll(type); + } + catch (Exception e) + { + LoggerInstance.Msg($"Failed while patching {type.Name}!"); + LoggerInstance.Error(e); + } + } +} \ No newline at end of file diff --git a/KneeFix/Properties/AssemblyInfo.cs b/KneeFix/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..35cae8b --- /dev/null +++ b/KneeFix/Properties/AssemblyInfo.cs @@ -0,0 +1,30 @@ +using MelonLoader; +using NAK.Melons.KneeFix.Properties; +using System.Reflection; + +[assembly: AssemblyVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyTitle(nameof(NAK.Melons.KneeFix))] +[assembly: AssemblyCompany(AssemblyInfoParams.Author)] +[assembly: AssemblyProduct(nameof(NAK.Melons.KneeFix))] + +[assembly: MelonInfo( + typeof(NAK.Melons.KneeFix.KneeFixMod), + nameof(NAK.Melons.KneeFix), + AssemblyInfoParams.Version, + AssemblyInfoParams.Author, + downloadLink: "https://github.com/NotAKidOnSteam/KneeFix" +)] + +[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] +[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] +[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] +[assembly: HarmonyDontPatchAll] + +namespace NAK.Melons.KneeFix.Properties; +internal static class AssemblyInfoParams +{ + public const string Version = "1.0.0"; + public const string Author = "NotAKidoS"; +} \ No newline at end of file diff --git a/KneeFix/format.json b/KneeFix/format.json new file mode 100644 index 0000000..61530f4 --- /dev/null +++ b/KneeFix/format.json @@ -0,0 +1,23 @@ +{ + "_id": -1, + "name": "KneeFix", + "modversion": "1.0.0", + "gameversion": "2022r170", + "loaderversion": "0.5.7", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Small fix to knee tracking while in FBT.\n\nThis also partially fixes running animations in FBT & emote direction.", + "searchtags": [ + "knee", + "ik", + "tracking", + "fix" + ], + "requirements": [ + "None" + ], + "downloadlink": "https://github.com/NotAKidOnSteam/KneeFix/releases/download/v1.0.0/KneeFix.dll", + "sourcelink": "https://github.com/NotAKidOnSteam/KneeFix/", + "changelog": "Initial Release", + "embedcolor": "7F3F99" +} \ No newline at end of file From bde5eb34600733eadeff503ab14aad1be08857c9 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 21:53:47 -0500 Subject: [PATCH 03/24] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index c8879ef..a57262e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,18 @@ # KneeFix simple fix to knee tracking + +## Relevant Feedback Posts: +https://feedback.abinteractive.net/p/ik-knee-tracking + +https://feedback.abinteractive.net/p/2022r170-ex3-knee-ik-weirdness-when-using-knee-trackers + +--- + +Here is the block of text where I tell you this mod is not affiliated or endorsed by ABI. +https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games + +> This mod is an independent creation and is not affiliated with, supported by or approved by Alpha Blend Interactive. + +> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. + +> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. From ae3e6ffa427d2977a19d1d28fe1e768452a7bca1 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:28:11 -0500 Subject: [PATCH 04/24] fixes --- KneeFix/HarmonyPatches.cs | 142 ++++++++++++++++++++++++++++++++++++-- KneeFix/Main.cs | 3 +- KneeFix/format.json | 2 +- 3 files changed, 140 insertions(+), 7 deletions(-) diff --git a/KneeFix/HarmonyPatches.cs b/KneeFix/HarmonyPatches.cs index d458035..cc17073 100644 --- a/KneeFix/HarmonyPatches.cs +++ b/KneeFix/HarmonyPatches.cs @@ -1,5 +1,8 @@ -using ABI_RC.Systems.IK; +using ABI.CCK.Components; +using ABI_RC.Core.Player; +using ABI_RC.Systems.IK; using ABI_RC.Systems.IK.SubSystems; +using ABI_RC.Systems.MovementSystem; using HarmonyLib; using RootMotion.FinalIK; using UnityEngine; @@ -38,13 +41,105 @@ internal static class BodySystemPatches } } - [HarmonyPostfix] + [HarmonyPrefix] [HarmonyPatch(typeof(BodySystem), "Update")] - private static void Postfix_BodySystem_Update() + private static bool Prefix_BodySystem_Update(ref BodySystem __instance) { + if (IKSystem.vrik == null) return false; + IKSolverVR solver = IKSystem.vrik.solver; + + // Allow avatar to rotate seperatly from Player (Desktop&VR) // FBT needs avatar root to follow head - if (IKSystem.vrik != null) - IKSystem.vrik.solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 180f; + solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 180f; + + if (BodySystem.TrackingEnabled) + { + IKSystem.vrik.enabled = true; + solver.IKPositionWeight = BodySystem.TrackingPositionWeight; + solver.locomotion.weight = BodySystem.TrackingLocomotionEnabled ? 1f : 0f; + + // fixes arm weights not being set if leftArm & rightArm targets are null + // game handles TrackingLegs in PlayerSetup, but not for knee goals + SetArmWeight(solver.leftArm, BodySystem.TrackingLeftArmEnabled && solver.leftArm.target != null ? 1f : 0f); + SetArmWeight(solver.rightArm, BodySystem.TrackingRightArmEnabled && solver.rightArm.target != null ? 1f : 0f); + SetLegWeight(solver.leftLeg, BodySystem.TrackingLeftLegEnabled && solver.leftLeg.target != null ? 1f : 0f); + SetLegWeight(solver.rightLeg, BodySystem.TrackingRightLegEnabled && solver.leftLeg.target != null ? 1f : 0f); + SetPelvisWeight(solver.spine, solver.spine.pelvisTarget != null ? 1f : 0f); + + // makes running animation look better + if (BodySystem.isCalibratedAsFullBody) + { + bool isRunning = BodySystem.PlayRunningAnimationInFullBody && MovementSystem.Instance.movementVector.magnitude > 0f; + SetPelvisWeight(solver.spine, isRunning ? 0f : 1f); + } + } + else + { + IKSystem.vrik.enabled = false; + solver.IKPositionWeight = 0f; + solver.locomotion.weight = 0f; + + SetArmWeight(solver.leftArm, 0f); + SetArmWeight(solver.rightArm, 0f); + SetLegWeight(solver.leftLeg, 0f); + SetLegWeight(solver.rightLeg, 0f); + SetPelvisWeight(solver.spine, 0f); + } + + int num = 0; + int count = IKSystem.Instance.AllTrackingPoints.FindAll((TrackingPoint m) => m.isActive && m.isValid && m.suggestedRole > TrackingPoint.TrackingRole.Invalid).Count; + + // fixes having all tracking points disabled forcing calibration + if (count == 0) + { + __instance._fbtAvailable = false; + return false; + } + + // solid body count block + if (BodySystem.enableLeftFootTracking) num++; + if (BodySystem.enableRightFootTracking) num++; + if (BodySystem.enableHipTracking) num++; + if (BodySystem.enableLeftKneeTracking) num++; + if (BodySystem.enableRightKneeTracking) num++; + if (BodySystem.enableChestTracking) num++; + if (BodySystem.enableLeftElbowTracking) num++; + if (BodySystem.enableRightElbowTracking) num++; + + __instance._fbtAvailable = (count >= num); + + void SetArmWeight(IKSolverVR.Arm arm, float weight) + { + arm.positionWeight = weight; + arm.rotationWeight = weight; + arm.shoulderRotationWeight = weight; + arm.shoulderTwistWeight = weight; + // assumed fix of bend goal weight if arms disabled with elbows (havent tested) + arm.bendGoalWeight = arm.bendGoal != null ? weight : 0f; + } + void SetLegWeight(IKSolverVR.Leg leg, float weight) + { + leg.positionWeight = weight; + leg.rotationWeight = weight; + // fixes knees bending to tracker if feet disabled (running anim) + leg.bendGoalWeight = leg.bendGoal != null ? weight : 0f; + } + void SetPelvisWeight(IKSolverVR.Spine spine, float weight) + { + // looks better when hips are disabled while running + if (spine.pelvisTarget != null) + { + spine.pelvisPositionWeight = weight; + spine.pelvisRotationWeight = weight; + } + else + { + spine.pelvisPositionWeight = 0f; + spine.pelvisRotationWeight = 0f; + } + } + + return false; } } @@ -89,4 +184,41 @@ internal static class VRIKPatches if (__instance.usingKneeTracker) __instance.ApplyBendGoal(); } +} + +internal static class PlayerSetupPatches +{ + // Last Movement Parent Info + static Vector3 lastMovementPosition; + static Quaternion lastMovementRotation; + + [HarmonyPrefix] + [HarmonyPatch(typeof(PlayerSetup), "ResetIk")] + private static bool Prefix_PlayerSetup_ResetIk() + { + if (IKSystem.vrik == null) return false; + + CVRMovementParent currentParent = MovementSystem.Instance._currentParent; + if (currentParent != null && currentParent._referencePoint != null) + { + // Get current position, VR pivots around VR camera + Vector3 currentPosition = MovementSystem.Instance.rotationPivot.transform.position; + currentPosition.y = IKSystem.vrik.transform.position.y; // set pivot to floor + Quaternion currentRotation = Quaternion.Euler(0f, currentParent.transform.rotation.eulerAngles.y, 0f); + + // Convert to delta position (how much changed since last frame) + Vector3 deltaPosition = currentPosition - lastMovementPosition; + Quaternion deltaRotation = Quaternion.Inverse(lastMovementRotation) * currentRotation; + + // Add platform motion to IK solver + IKSystem.vrik.solver.AddPlatformMotion(deltaPosition, deltaRotation, currentPosition); + + // Store for next frame + lastMovementPosition = currentPosition; + lastMovementRotation = currentRotation; + return false; + } + + return true; + } } \ No newline at end of file diff --git a/KneeFix/Main.cs b/KneeFix/Main.cs index 816a050..186ad88 100644 --- a/KneeFix/Main.cs +++ b/KneeFix/Main.cs @@ -6,8 +6,9 @@ public class KneeFixMod : MelonMod { public override void OnInitializeMelon() { - ApplyPatches(typeof(HarmonyPatches.BodySystemPatches)); ApplyPatches(typeof(HarmonyPatches.VRIKPatches)); + ApplyPatches(typeof(HarmonyPatches.BodySystemPatches)); + ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches)); } void ApplyPatches(Type type) diff --git a/KneeFix/format.json b/KneeFix/format.json index 61530f4..d4cea3e 100644 --- a/KneeFix/format.json +++ b/KneeFix/format.json @@ -6,7 +6,7 @@ "loaderversion": "0.5.7", "modtype": "Mod", "author": "NotAKidoS", - "description": "Small fix to knee tracking while in FBT.\n\nThis also partially fixes running animations in FBT & emote direction.", + "description": "Small fix to knee tracking while in FBT.\n\nThis mod also fixes running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and VRIK locomotion on movement parents.", "searchtags": [ "knee", "ik", From 74d44b47ff8b080a6c9d0977041f458a0b00857f Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:30:07 -0500 Subject: [PATCH 05/24] Update format.json --- KneeFix/format.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KneeFix/format.json b/KneeFix/format.json index d4cea3e..0e02f7e 100644 --- a/KneeFix/format.json +++ b/KneeFix/format.json @@ -6,7 +6,7 @@ "loaderversion": "0.5.7", "modtype": "Mod", "author": "NotAKidoS", - "description": "Small fix to knee tracking while in FBT.\n\nThis mod also fixes running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and VRIK locomotion on movement parents.", + "description": "Small fixes to knee tracking while in FBT.\n\nThis mod also fixes running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents.", "searchtags": [ "knee", "ik", @@ -19,5 +19,5 @@ "downloadlink": "https://github.com/NotAKidOnSteam/KneeFix/releases/download/v1.0.0/KneeFix.dll", "sourcelink": "https://github.com/NotAKidOnSteam/KneeFix/", "changelog": "Initial Release", - "embedcolor": "7F3F99" + "embedcolor": "f46e49" } \ No newline at end of file From 2769c089ff79104922ae89f3e81d8d984dbef519 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:35:15 -0500 Subject: [PATCH 06/24] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index a57262e..155346a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ https://feedback.abinteractive.net/p/ik-knee-tracking https://feedback.abinteractive.net/p/2022r170-ex3-knee-ik-weirdness-when-using-knee-trackers +https://feedback.abinteractive.net/p/disabling-all-tracked-points-makes-game-assume-fbt + +https://feedback.abinteractive.net/p/about-ik-behaviour + +https://feedback.abinteractive.net/p/vrik-addplatformmotion-for-movement-parents + --- Here is the block of text where I tell you this mod is not affiliated or endorsed by ABI. From 83c6ed8255da837dce0ac2f6ee5f7ca618df8035 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:35:39 -0500 Subject: [PATCH 07/24] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 155346a..1bd9272 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # KneeFix - simple fix to knee tracking +Small fixes to knee tracking while in FBT. + +This mod also fixes running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents. ## Relevant Feedback Posts: https://feedback.abinteractive.net/p/ik-knee-tracking From 6003f035b58ed1dccc944563a025a0bd9d1ceb13 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:38:40 -0500 Subject: [PATCH 08/24] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bd9272..d9f435b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# KneeFix +# IKFixes Small fixes to knee tracking while in FBT. This mod also fixes running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents. From 1389787e8c8c1df2604e786fc8899dd0a7773b40 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:39:28 -0500 Subject: [PATCH 09/24] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index d9f435b..30f4f06 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # IKFixes -Small fixes to knee tracking while in FBT. - -This mod also fixes running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents. +Small fixes to knee tracking while in FBT, which lead to fixing running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents. ## Relevant Feedback Posts: https://feedback.abinteractive.net/p/ik-knee-tracking From 54c7c7cb57beafd3644faebc7efc6ef69a665fec Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:39:54 -0500 Subject: [PATCH 10/24] a --- {KneeFix => IKFixes}/HarmonyPatches.cs | 2 +- .../KneeFix.csproj => IKFixes/IKFixes.csproj | 0 KneeFix/KneeFix.sln => IKFixes/IKFixes.sln | 0 {KneeFix => IKFixes}/Main.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 14 +++++------ IKFixes/format.json | 23 +++++++++++++++++++ KneeFix/format.json | 23 ------------------- 7 files changed, 33 insertions(+), 33 deletions(-) rename {KneeFix => IKFixes}/HarmonyPatches.cs (99%) rename KneeFix/KneeFix.csproj => IKFixes/IKFixes.csproj (100%) rename KneeFix/KneeFix.sln => IKFixes/IKFixes.sln (100%) rename {KneeFix => IKFixes}/Main.cs (89%) rename {KneeFix => IKFixes}/Properties/AssemblyInfo.cs (70%) create mode 100644 IKFixes/format.json delete mode 100644 KneeFix/format.json diff --git a/KneeFix/HarmonyPatches.cs b/IKFixes/HarmonyPatches.cs similarity index 99% rename from KneeFix/HarmonyPatches.cs rename to IKFixes/HarmonyPatches.cs index cc17073..737fd18 100644 --- a/KneeFix/HarmonyPatches.cs +++ b/IKFixes/HarmonyPatches.cs @@ -7,7 +7,7 @@ using HarmonyLib; using RootMotion.FinalIK; using UnityEngine; -namespace NAK.Melons.KneeFix.HarmonyPatches; +namespace NAK.Melons.IKFixes.HarmonyPatches; internal static class BodySystemPatches { diff --git a/KneeFix/KneeFix.csproj b/IKFixes/IKFixes.csproj similarity index 100% rename from KneeFix/KneeFix.csproj rename to IKFixes/IKFixes.csproj diff --git a/KneeFix/KneeFix.sln b/IKFixes/IKFixes.sln similarity index 100% rename from KneeFix/KneeFix.sln rename to IKFixes/IKFixes.sln diff --git a/KneeFix/Main.cs b/IKFixes/Main.cs similarity index 89% rename from KneeFix/Main.cs rename to IKFixes/Main.cs index 186ad88..1e0da50 100644 --- a/KneeFix/Main.cs +++ b/IKFixes/Main.cs @@ -1,8 +1,8 @@ using MelonLoader; -namespace NAK.Melons.KneeFix; +namespace NAK.Melons.IKFixes; -public class KneeFixMod : MelonMod +public class IKFixesMod : MelonMod { public override void OnInitializeMelon() { diff --git a/KneeFix/Properties/AssemblyInfo.cs b/IKFixes/Properties/AssemblyInfo.cs similarity index 70% rename from KneeFix/Properties/AssemblyInfo.cs rename to IKFixes/Properties/AssemblyInfo.cs index 35cae8b..01df028 100644 --- a/KneeFix/Properties/AssemblyInfo.cs +++ b/IKFixes/Properties/AssemblyInfo.cs @@ -1,20 +1,20 @@ using MelonLoader; -using NAK.Melons.KneeFix.Properties; +using NAK.Melons.IKFixes.Properties; using System.Reflection; [assembly: AssemblyVersion(AssemblyInfoParams.Version)] [assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] [assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.Melons.KneeFix))] +[assembly: AssemblyTitle(nameof(NAK.Melons.IKFixes))] [assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.Melons.KneeFix))] +[assembly: AssemblyProduct(nameof(NAK.Melons.IKFixes))] [assembly: MelonInfo( - typeof(NAK.Melons.KneeFix.KneeFixMod), - nameof(NAK.Melons.KneeFix), + typeof(NAK.Melons.IKFixes.IKFixesMod), + nameof(NAK.Melons.IKFixes), AssemblyInfoParams.Version, AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidOnSteam/KneeFix" + downloadLink: "https://github.com/NotAKidOnSteam/IKFixes" )] [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] @@ -22,7 +22,7 @@ using System.Reflection; [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] [assembly: HarmonyDontPatchAll] -namespace NAK.Melons.KneeFix.Properties; +namespace NAK.Melons.IKFixes.Properties; internal static class AssemblyInfoParams { public const string Version = "1.0.0"; diff --git a/IKFixes/format.json b/IKFixes/format.json new file mode 100644 index 0000000..a072d41 --- /dev/null +++ b/IKFixes/format.json @@ -0,0 +1,23 @@ +{ + "_id": -1, + "name": "IKFixes", + "modversion": "1.0.0", + "gameversion": "2022r170", + "loaderversion": "0.5.7", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Small fixes to knee tracking while in FBT, which lead to fixing running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents.", + "searchtags": [ + "knee", + "ik", + "tracking", + "fix" + ], + "requirements": [ + "None" + ], + "downloadlink": "https://github.com/NotAKidOnSteam/IKFixes/releases/download/v1.0.0/IKFixes.dll", + "sourcelink": "https://github.com/NotAKidOnSteam/IKFixes/", + "changelog": "Initial Release", + "embedcolor": "f46e49" +} \ No newline at end of file diff --git a/KneeFix/format.json b/KneeFix/format.json deleted file mode 100644 index 0e02f7e..0000000 --- a/KneeFix/format.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "_id": -1, - "name": "KneeFix", - "modversion": "1.0.0", - "gameversion": "2022r170", - "loaderversion": "0.5.7", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Small fixes to knee tracking while in FBT.\n\nThis mod also fixes running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents.", - "searchtags": [ - "knee", - "ik", - "tracking", - "fix" - ], - "requirements": [ - "None" - ], - "downloadlink": "https://github.com/NotAKidOnSteam/KneeFix/releases/download/v1.0.0/KneeFix.dll", - "sourcelink": "https://github.com/NotAKidOnSteam/KneeFix/", - "changelog": "Initial Release", - "embedcolor": "f46e49" -} \ No newline at end of file From 331682edc73bbcdd77e716ec5da98101a218c2fe Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:42:45 -0500 Subject: [PATCH 11/24] Update format.json --- IKFixes/format.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IKFixes/format.json b/IKFixes/format.json index a072d41..a800d3f 100644 --- a/IKFixes/format.json +++ b/IKFixes/format.json @@ -6,7 +6,7 @@ "loaderversion": "0.5.7", "modtype": "Mod", "author": "NotAKidoS", - "description": "Small fixes to knee tracking while in FBT, which lead to fixing running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents.", + "description": "A few small fixes to IK.\n\nFixed knee tracking, running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents.", "searchtags": [ "knee", "ik", From acb49d0f9edcbfd6bd1fd9c28d93ffef4f279635 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:43:04 -0500 Subject: [PATCH 12/24] Update IKFixes.sln --- IKFixes/IKFixes.sln | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/IKFixes/IKFixes.sln b/IKFixes/IKFixes.sln index 8e3517d..03a1417 100644 --- a/IKFixes/IKFixes.sln +++ b/IKFixes/IKFixes.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.2.32630.192 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KneeFix", "KneeFix.csproj", "{EF74B9F3-3891-4884-A8E1-B1BEE38E1803}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IKFixes", "IKFixes.csproj", "{AD8D4FA6-8A34-4773-AA24-61F65976182F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,15 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EF74B9F3-3891-4884-A8E1-B1BEE38E1803}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EF74B9F3-3891-4884-A8E1-B1BEE38E1803}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EF74B9F3-3891-4884-A8E1-B1BEE38E1803}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EF74B9F3-3891-4884-A8E1-B1BEE38E1803}.Release|Any CPU.Build.0 = Release|Any CPU + {AD8D4FA6-8A34-4773-AA24-61F65976182F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD8D4FA6-8A34-4773-AA24-61F65976182F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD8D4FA6-8A34-4773-AA24-61F65976182F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD8D4FA6-8A34-4773-AA24-61F65976182F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {57B73DF6-AE94-4453-AE6D-CC87E6DE9B97} + SolutionGuid = {1D85DEE4-4BBC-43DD-8AA4-53478A0915F7} EndGlobalSection EndGlobal From 6968b78f06f1026f99e3e144dc3c0999712faf15 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Fri, 7 Apr 2023 22:44:21 -0500 Subject: [PATCH 13/24] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 30f4f06..d29d53c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # IKFixes -Small fixes to knee tracking while in FBT, which lead to fixing running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents. +A few small fixes to IK. + +Fixed knee tracking, running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents. ## Relevant Feedback Posts: https://feedback.abinteractive.net/p/ik-knee-tracking From 7fdbac09e6a99418dc8cb534142e8fed433d3bff Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Sat, 8 Apr 2023 00:15:56 -0500 Subject: [PATCH 14/24] fix saved calibration on restart --- IKFixes/HarmonyPatches.cs | 70 ++++++++++++++++++++------------------- IKFixes/IKFixes.csproj | 3 +- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/IKFixes/HarmonyPatches.cs b/IKFixes/HarmonyPatches.cs index 737fd18..bd2c767 100644 --- a/IKFixes/HarmonyPatches.cs +++ b/IKFixes/HarmonyPatches.cs @@ -45,45 +45,47 @@ internal static class BodySystemPatches [HarmonyPatch(typeof(BodySystem), "Update")] private static bool Prefix_BodySystem_Update(ref BodySystem __instance) { - if (IKSystem.vrik == null) return false; - IKSolverVR solver = IKSystem.vrik.solver; - - // Allow avatar to rotate seperatly from Player (Desktop&VR) - // FBT needs avatar root to follow head - solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 180f; - - if (BodySystem.TrackingEnabled) + if (IKSystem.vrik != null) { - IKSystem.vrik.enabled = true; - solver.IKPositionWeight = BodySystem.TrackingPositionWeight; - solver.locomotion.weight = BodySystem.TrackingLocomotionEnabled ? 1f : 0f; + IKSolverVR solver = IKSystem.vrik.solver; - // fixes arm weights not being set if leftArm & rightArm targets are null - // game handles TrackingLegs in PlayerSetup, but not for knee goals - SetArmWeight(solver.leftArm, BodySystem.TrackingLeftArmEnabled && solver.leftArm.target != null ? 1f : 0f); - SetArmWeight(solver.rightArm, BodySystem.TrackingRightArmEnabled && solver.rightArm.target != null ? 1f : 0f); - SetLegWeight(solver.leftLeg, BodySystem.TrackingLeftLegEnabled && solver.leftLeg.target != null ? 1f : 0f); - SetLegWeight(solver.rightLeg, BodySystem.TrackingRightLegEnabled && solver.leftLeg.target != null ? 1f : 0f); - SetPelvisWeight(solver.spine, solver.spine.pelvisTarget != null ? 1f : 0f); + // Allow avatar to rotate seperatly from Player (Desktop&VR) + // FBT needs avatar root to follow head + solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 180f; - // makes running animation look better - if (BodySystem.isCalibratedAsFullBody) + if (BodySystem.TrackingEnabled) { - bool isRunning = BodySystem.PlayRunningAnimationInFullBody && MovementSystem.Instance.movementVector.magnitude > 0f; - SetPelvisWeight(solver.spine, isRunning ? 0f : 1f); - } - } - else - { - IKSystem.vrik.enabled = false; - solver.IKPositionWeight = 0f; - solver.locomotion.weight = 0f; + IKSystem.vrik.enabled = true; + solver.IKPositionWeight = BodySystem.TrackingPositionWeight; + solver.locomotion.weight = BodySystem.TrackingLocomotionEnabled ? 1f : 0f; - SetArmWeight(solver.leftArm, 0f); - SetArmWeight(solver.rightArm, 0f); - SetLegWeight(solver.leftLeg, 0f); - SetLegWeight(solver.rightLeg, 0f); - SetPelvisWeight(solver.spine, 0f); + // fixes arm weights not being set if leftArm & rightArm targets are null + // game handles TrackingLegs in PlayerSetup, but not for knee goals + SetArmWeight(solver.leftArm, BodySystem.TrackingLeftArmEnabled && solver.leftArm.target != null ? 1f : 0f); + SetArmWeight(solver.rightArm, BodySystem.TrackingRightArmEnabled && solver.rightArm.target != null ? 1f : 0f); + SetLegWeight(solver.leftLeg, BodySystem.TrackingLeftLegEnabled && solver.leftLeg.target != null ? 1f : 0f); + SetLegWeight(solver.rightLeg, BodySystem.TrackingRightLegEnabled && solver.leftLeg.target != null ? 1f : 0f); + SetPelvisWeight(solver.spine, solver.spine.pelvisTarget != null ? 1f : 0f); + + // makes running animation look better + if (BodySystem.isCalibratedAsFullBody) + { + bool isRunning = BodySystem.PlayRunningAnimationInFullBody && MovementSystem.Instance.movementVector.magnitude > 0f; + SetPelvisWeight(solver.spine, isRunning ? 0f : 1f); + } + } + else + { + IKSystem.vrik.enabled = false; + solver.IKPositionWeight = 0f; + solver.locomotion.weight = 0f; + + SetArmWeight(solver.leftArm, 0f); + SetArmWeight(solver.rightArm, 0f); + SetLegWeight(solver.leftLeg, 0f); + SetLegWeight(solver.rightLeg, 0f); + SetPelvisWeight(solver.spine, 0f); + } } int num = 0; diff --git a/IKFixes/IKFixes.csproj b/IKFixes/IKFixes.csproj index 6abdb17..6e01903 100644 --- a/IKFixes/IKFixes.csproj +++ b/IKFixes/IKFixes.csproj @@ -64,7 +64,8 @@ - + + From 62d118ce466bfe25d70e426f37ff34072b626d13 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:15:11 -0500 Subject: [PATCH 15/24] fix upper leg nerds --- IKFixes/HarmonyPatches.cs | 2 +- IKFixes/format.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IKFixes/HarmonyPatches.cs b/IKFixes/HarmonyPatches.cs index bd2c767..b5d04f1 100644 --- a/IKFixes/HarmonyPatches.cs +++ b/IKFixes/HarmonyPatches.cs @@ -35,7 +35,7 @@ internal static class BodySystemPatches trackingPoint.offsetTransform.localRotation = Quaternion.identity; trackingPoint.offsetTransform.parent = trackingPoint.referenceTransform; - Vector3 b = IKSystem.vrik.references.root.forward * 0.5f; + Vector3 b = IKSystem.vrik.references.root.forward * 0.1f; trackingPoint.offsetTransform.position += b; } } diff --git a/IKFixes/format.json b/IKFixes/format.json index a800d3f..062c326 100644 --- a/IKFixes/format.json +++ b/IKFixes/format.json @@ -1,5 +1,5 @@ { - "_id": -1, + "_id": 142, "name": "IKFixes", "modversion": "1.0.0", "gameversion": "2022r170", From 8ddea9119493e8b96730920572966b4deee1345f Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Sun, 9 Apr 2023 15:15:35 -0500 Subject: [PATCH 16/24] add note for future --- IKFixes/HarmonyPatches.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IKFixes/HarmonyPatches.cs b/IKFixes/HarmonyPatches.cs index b5d04f1..115be5d 100644 --- a/IKFixes/HarmonyPatches.cs +++ b/IKFixes/HarmonyPatches.cs @@ -35,6 +35,8 @@ internal static class BodySystemPatches trackingPoint.offsetTransform.localRotation = Quaternion.identity; trackingPoint.offsetTransform.parent = trackingPoint.referenceTransform; + // small amount forward, as pivot is different for users who place + // tracker on upper/lower leg. 0.5f was too much for users using upper leg. Vector3 b = IKSystem.vrik.references.root.forward * 0.1f; trackingPoint.offsetTransform.position += b; } From a563c0ad019d351fa235a7da8a160f011325cf03 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Mon, 10 Apr 2023 01:45:14 -0500 Subject: [PATCH 17/24] halfbody hip direction fix --- IKFixes/HarmonyPatches.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/IKFixes/HarmonyPatches.cs b/IKFixes/HarmonyPatches.cs index 115be5d..592b86e 100644 --- a/IKFixes/HarmonyPatches.cs +++ b/IKFixes/HarmonyPatches.cs @@ -53,7 +53,8 @@ internal static class BodySystemPatches // Allow avatar to rotate seperatly from Player (Desktop&VR) // FBT needs avatar root to follow head - solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 180f; + // VR default is 25 degrees + solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 25f; if (BodySystem.TrackingEnabled) { @@ -73,7 +74,7 @@ internal static class BodySystemPatches if (BodySystem.isCalibratedAsFullBody) { bool isRunning = BodySystem.PlayRunningAnimationInFullBody && MovementSystem.Instance.movementVector.magnitude > 0f; - SetPelvisWeight(solver.spine, isRunning ? 0f : 1f); + if (isRunning) SetPelvisWeight(solver.spine, 0f); } } else @@ -131,16 +132,8 @@ internal static class BodySystemPatches void SetPelvisWeight(IKSolverVR.Spine spine, float weight) { // looks better when hips are disabled while running - if (spine.pelvisTarget != null) - { - spine.pelvisPositionWeight = weight; - spine.pelvisRotationWeight = weight; - } - else - { - spine.pelvisPositionWeight = 0f; - spine.pelvisRotationWeight = 0f; - } + spine.pelvisPositionWeight = weight; + spine.pelvisRotationWeight = weight; } return false; From dc7b9c4860c97b29b861f64b0f5c0d29d3053c32 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Mon, 10 Apr 2023 01:49:53 -0500 Subject: [PATCH 18/24] bump ver --- IKFixes/Properties/AssemblyInfo.cs | 2 +- IKFixes/format.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IKFixes/Properties/AssemblyInfo.cs b/IKFixes/Properties/AssemblyInfo.cs index 01df028..4d8c584 100644 --- a/IKFixes/Properties/AssemblyInfo.cs +++ b/IKFixes/Properties/AssemblyInfo.cs @@ -25,6 +25,6 @@ using System.Reflection; namespace NAK.Melons.IKFixes.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.0"; + public const string Version = "1.0.1"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/IKFixes/format.json b/IKFixes/format.json index 062c326..63f756a 100644 --- a/IKFixes/format.json +++ b/IKFixes/format.json @@ -1,7 +1,7 @@ { "_id": 142, "name": "IKFixes", - "modversion": "1.0.0", + "modversion": "1.0.1", "gameversion": "2022r170", "loaderversion": "0.5.7", "modtype": "Mod", @@ -16,7 +16,7 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidOnSteam/IKFixes/releases/download/v1.0.0/IKFixes.dll", + "downloadlink": "https://github.com/NotAKidOnSteam/IKFixes/releases/download/v1.0.1/IKFixes.dll", "sourcelink": "https://github.com/NotAKidOnSteam/IKFixes/", "changelog": "Initial Release", "embedcolor": "f46e49" From d1abb3b4ef0ca61a582135b69abf89398217278f Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Mon, 10 Apr 2023 03:01:26 -0500 Subject: [PATCH 19/24] add faked root angle fix from DesktopVRIK --- IKFixes/HarmonyPatches.cs | 32 +++++++++++++++++++++++++++----- IKFixes/Main.cs | 10 ++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/IKFixes/HarmonyPatches.cs b/IKFixes/HarmonyPatches.cs index 592b86e..33b697a 100644 --- a/IKFixes/HarmonyPatches.cs +++ b/IKFixes/HarmonyPatches.cs @@ -11,6 +11,8 @@ namespace NAK.Melons.IKFixes.HarmonyPatches; internal static class BodySystemPatches { + static float _ikSimulatedRootAngle = 0f; + [HarmonyPostfix] [HarmonyPatch(typeof(BodySystem), "SetupOffsets")] private static void Postfix_BodySystem_SetupOffsets(List trackingPoints) @@ -51,11 +53,6 @@ internal static class BodySystemPatches { IKSolverVR solver = IKSystem.vrik.solver; - // Allow avatar to rotate seperatly from Player (Desktop&VR) - // FBT needs avatar root to follow head - // VR default is 25 degrees - solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 25f; - if (BodySystem.TrackingEnabled) { IKSystem.vrik.enabled = true; @@ -89,6 +86,31 @@ internal static class BodySystemPatches SetLegWeight(solver.rightLeg, 0f); SetPelvisWeight(solver.spine, 0f); } + + if (IKFixesMod.EntryUseFakeRootAngle.Value) + { + // Emulate maxRootAngle because CVR doesn't have the player controller set up ideally for VRIK. + // This is a small small fix, but makes it so the feet dont point in the direction of the head + // when turning. It also means turning with joystick & turning IRL make feet behave the same and follow behind. + float weightedAngleLimit = IKFixesMod.EntryFakeRootAngleLimit.Value * solver.locomotion.weight; + float pivotAngle = MovementSystem.Instance.rotationPivot.eulerAngles.y; + float deltaAngleRoot = Mathf.DeltaAngle(pivotAngle, _ikSimulatedRootAngle); + float absDeltaAngleRoot = Mathf.Abs(deltaAngleRoot); + if (absDeltaAngleRoot > weightedAngleLimit) + { + deltaAngleRoot = Mathf.Sign(deltaAngleRoot) * weightedAngleLimit; + _ikSimulatedRootAngle = Mathf.MoveTowardsAngle(_ikSimulatedRootAngle, pivotAngle, absDeltaAngleRoot - weightedAngleLimit); + } + solver.spine.maxRootAngle = 0f; + solver.spine.rootHeadingOffset = deltaAngleRoot; + } + else + { + // Allow avatar to rotate seperatly from Player (Desktop&VR) + // FBT needs avatar root to follow head + // VR default is 25 degrees + solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 25f; + } } int num = 0; diff --git a/IKFixes/Main.cs b/IKFixes/Main.cs index 1e0da50..1d1f076 100644 --- a/IKFixes/Main.cs +++ b/IKFixes/Main.cs @@ -4,6 +4,16 @@ namespace NAK.Melons.IKFixes; public class IKFixesMod : MelonMod { + internal static MelonLogger.Instance Logger; + public const string SettingsCategory = "IKFixes"; + public static readonly MelonPreferences_Category CategoryIKFixes = MelonPreferences.CreateCategory(SettingsCategory); + + public static readonly MelonPreferences_Entry EntryUseFakeRootAngle = + CategoryIKFixes.CreateEntry("Use Fake Root Angle", false, description: "Emulates maxRootAngle. This fixes feet pointing in direction of head when looking around."); + + public static readonly MelonPreferences_Entry EntryFakeRootAngleLimit = + CategoryIKFixes.CreateEntry("Fake Root Angle Limit", 25f, description: "Specifies the maximum angle the lower body can have relative to the head when rotating."); + public override void OnInitializeMelon() { ApplyPatches(typeof(HarmonyPatches.VRIKPatches)); From 677684b301db943a5b0b921fde34c1f65d772cd6 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Mon, 10 Apr 2023 03:01:45 -0500 Subject: [PATCH 20/24] bump --- IKFixes/Main.cs | 1 - IKFixes/Properties/AssemblyInfo.cs | 2 +- IKFixes/format.json | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/IKFixes/Main.cs b/IKFixes/Main.cs index 1d1f076..779dcb7 100644 --- a/IKFixes/Main.cs +++ b/IKFixes/Main.cs @@ -4,7 +4,6 @@ namespace NAK.Melons.IKFixes; public class IKFixesMod : MelonMod { - internal static MelonLogger.Instance Logger; public const string SettingsCategory = "IKFixes"; public static readonly MelonPreferences_Category CategoryIKFixes = MelonPreferences.CreateCategory(SettingsCategory); diff --git a/IKFixes/Properties/AssemblyInfo.cs b/IKFixes/Properties/AssemblyInfo.cs index 4d8c584..47cc61b 100644 --- a/IKFixes/Properties/AssemblyInfo.cs +++ b/IKFixes/Properties/AssemblyInfo.cs @@ -25,6 +25,6 @@ using System.Reflection; namespace NAK.Melons.IKFixes.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.1"; + public const string Version = "1.0.2"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/IKFixes/format.json b/IKFixes/format.json index 63f756a..c4a5834 100644 --- a/IKFixes/format.json +++ b/IKFixes/format.json @@ -1,7 +1,7 @@ { "_id": 142, "name": "IKFixes", - "modversion": "1.0.1", + "modversion": "1.0.2", "gameversion": "2022r170", "loaderversion": "0.5.7", "modtype": "Mod", @@ -16,7 +16,7 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidOnSteam/IKFixes/releases/download/v1.0.1/IKFixes.dll", + "downloadlink": "https://github.com/NotAKidOnSteam/IKFixes/releases/download/v1.0.2/IKFixes.dll", "sourcelink": "https://github.com/NotAKidOnSteam/IKFixes/", "changelog": "Initial Release", "embedcolor": "f46e49" From d55099876da1272f684a92aa60df4938a34750d0 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Tue, 11 Apr 2023 14:49:15 -0500 Subject: [PATCH 21/24] Update HarmonyPatches.cs --- IKFixes/HarmonyPatches.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IKFixes/HarmonyPatches.cs b/IKFixes/HarmonyPatches.cs index 33b697a..3059a58 100644 --- a/IKFixes/HarmonyPatches.cs +++ b/IKFixes/HarmonyPatches.cs @@ -87,7 +87,7 @@ internal static class BodySystemPatches SetPelvisWeight(solver.spine, 0f); } - if (IKFixesMod.EntryUseFakeRootAngle.Value) + if (IKFixesMod.EntryUseFakeRootAngle.Value && !BodySystem.isCalibratedAsFullBody) { // Emulate maxRootAngle because CVR doesn't have the player controller set up ideally for VRIK. // This is a small small fix, but makes it so the feet dont point in the direction of the head @@ -108,7 +108,7 @@ internal static class BodySystemPatches { // Allow avatar to rotate seperatly from Player (Desktop&VR) // FBT needs avatar root to follow head - // VR default is 25 degrees + // VR default is 25 degrees, but maybe during emotes needs 180 degrees..? solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 25f; } } From a47e1d8ce739310d1e529c70aaf9256e7b08f9cd Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Thu, 13 Apr 2023 19:35:06 -0500 Subject: [PATCH 22/24] format --- IKFixes/Main.cs | 2 +- IKFixes/format.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IKFixes/Main.cs b/IKFixes/Main.cs index 779dcb7..59ab31b 100644 --- a/IKFixes/Main.cs +++ b/IKFixes/Main.cs @@ -8,7 +8,7 @@ public class IKFixesMod : MelonMod public static readonly MelonPreferences_Category CategoryIKFixes = MelonPreferences.CreateCategory(SettingsCategory); public static readonly MelonPreferences_Entry EntryUseFakeRootAngle = - CategoryIKFixes.CreateEntry("Use Fake Root Angle", false, description: "Emulates maxRootAngle. This fixes feet pointing in direction of head when looking around."); + CategoryIKFixes.CreateEntry("Use Fake Root Angle", true, description: "Emulates maxRootAngle. This fixes feet pointing in direction of head when looking around."); public static readonly MelonPreferences_Entry EntryFakeRootAngleLimit = CategoryIKFixes.CreateEntry("Fake Root Angle Limit", 25f, description: "Specifies the maximum angle the lower body can have relative to the head when rotating."); diff --git a/IKFixes/format.json b/IKFixes/format.json index c4a5834..828ef8c 100644 --- a/IKFixes/format.json +++ b/IKFixes/format.json @@ -6,7 +6,7 @@ "loaderversion": "0.5.7", "modtype": "Mod", "author": "NotAKidoS", - "description": "A few small fixes to IK.\n\nFixed knee tracking, running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents.", + "description": "A few small fixes to IK.\n\nFBT - Fixes knee tracking & running animations.\nHalfbody - Fixes footsteps on MovementParent & uses root angle offset to prevent feet from only pointing in head direction.", "searchtags": [ "knee", "ik", @@ -18,6 +18,6 @@ ], "downloadlink": "https://github.com/NotAKidOnSteam/IKFixes/releases/download/v1.0.2/IKFixes.dll", "sourcelink": "https://github.com/NotAKidOnSteam/IKFixes/", - "changelog": "Initial Release", + "changelog": "- Initial Release\n- Added FakeRootAngle fix for Halfbody. Feet will no longer only point in the direction of head while looking around/turning.", "embedcolor": "f46e49" } \ No newline at end of file From 87ad96e78464f4bdb6f9fbfa335e1eeff09d3af6 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Thu, 13 Apr 2023 19:41:53 -0500 Subject: [PATCH 23/24] Update format.json --- IKFixes/format.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IKFixes/format.json b/IKFixes/format.json index 828ef8c..0ca28a9 100644 --- a/IKFixes/format.json +++ b/IKFixes/format.json @@ -6,7 +6,7 @@ "loaderversion": "0.5.7", "modtype": "Mod", "author": "NotAKidoS", - "description": "A few small fixes to IK.\n\nFBT - Fixes knee tracking & running animations.\nHalfbody - Fixes footsteps on MovementParent & uses root angle offset to prevent feet from only pointing in head direction.", + "description": "A few small fixes to IK. Major ones are listed below:\n\n**FBT** - Fixes knee tracking & running animations.\n\n**Halfbody** - Fixes footsteps while on a MovementParent & uses root angle offset to prevent feet from only pointing in head direction.", "searchtags": [ "knee", "ik", @@ -18,6 +18,6 @@ ], "downloadlink": "https://github.com/NotAKidOnSteam/IKFixes/releases/download/v1.0.2/IKFixes.dll", "sourcelink": "https://github.com/NotAKidOnSteam/IKFixes/", - "changelog": "- Initial Release\n- Added FakeRootAngle fix for Halfbody. Feet will no longer only point in the direction of head while looking around/turning.", + "changelog": "- Initial Release\n- Added FakeRootAngle fix for Halfbody. Feet will no longer only point in the direction of head while looking around/turning. This can be disabled in mod settings.", "embedcolor": "f46e49" } \ No newline at end of file From 77b3988e33ccb0368abb98c306c901c7740c132b Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Thu, 13 Apr 2023 19:52:37 -0500 Subject: [PATCH 24/24] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d29d53c..594e248 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,15 @@ # IKFixes A few small fixes to IK. -Fixed knee tracking, running animations while in FBT, emotes playing in wrong direction in FBT, being forced to calibrate if all IK Tracking Settings are disabled, and for those not in FBT, VRIK locomotion footsteps on movement parents. +**FBT Fixes** - +* Knee tracking. +* Running animations.. +* Emotes playing in wrong direction. +* Forced to calibrate if all IK Tracking Settings are disabled. + +**Halfbody Fixes** - +* Locomotion footsteps while on Movement Parents. +* Root Angle Offset while looking around. Fixes feet only pointing in direction of head. ## Relevant Feedback Posts: https://feedback.abinteractive.net/p/ik-knee-tracking @@ -14,6 +22,8 @@ https://feedback.abinteractive.net/p/about-ik-behaviour https://feedback.abinteractive.net/p/vrik-addplatformmotion-for-movement-parents +https://feedback.abinteractive.net/p/halfbodyik-feet-will-only-point-in-direction-of-head + --- Here is the block of text where I tell you this mod is not affiliated or endorsed by ABI.