This commit is contained in:
NotAKidoS 2023-01-13 19:26:40 -06:00
parent da42d3da57
commit 8f4d146ba0
2 changed files with 104 additions and 101 deletions

View file

@ -83,7 +83,7 @@ public class DesktopVRIK : MonoBehaviour
IKSystem.vrik.fixTransforms = false; IKSystem.vrik.fixTransforms = false;
IKSystem.vrik.solver.plantFeet = false; IKSystem.vrik.solver.plantFeet = false;
IKSystem.vrik.solver.locomotion.weight = 0f; IKSystem.vrik.solver.locomotion.weight = 1f;
IKSystem.vrik.solver.locomotion.angleThreshold = 30f; IKSystem.vrik.solver.locomotion.angleThreshold = 30f;
IKSystem.vrik.solver.locomotion.maxLegStretch = 0.75f; IKSystem.vrik.solver.locomotion.maxLegStretch = 0.75f;
//nuke weights //nuke weights
@ -141,6 +141,7 @@ public class DesktopVRIK : MonoBehaviour
avatar.transform.rotation = originalRotation; avatar.transform.rotation = originalRotation;
IKSystem.Instance.ResetIK(); IKSystem.Instance.ResetIK();
IKSystem.Instance.animator.enabled = true;
} }
//This is built because original build placed IK Targets on all joints. //This is built because original build placed IK Targets on all joints.

View file

@ -105,6 +105,8 @@ class IKSystemPatches
{ {
if (IKSystem.Instance.animator != null && IKSystem.Instance.animator.avatar != null && IKSystem.Instance.animator.avatar.isHuman) if (IKSystem.Instance.animator != null && IKSystem.Instance.animator.avatar != null && IKSystem.Instance.animator.avatar.isHuman)
{ {
IKSystem.Instance.animator.enabled = false;
//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) //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) if (____poseHandler == null)
{ {
@ -112,10 +114,10 @@ class IKSystemPatches
} }
____poseHandler.GetHumanPose(ref ___humanPose); ____poseHandler.GetHumanPose(ref ___humanPose);
//for (int i = 0; i < TPoseMuscles.Length; i++) for (int i = 0; i < IKPoseMuscles.Length; i++)
//{ {
// IKSystem.Instance.ApplyMuscleValue((MuscleIndex)i, TPoseMuscles[i], ref ___humanPose.muscles); IKSystem.Instance.ApplyMuscleValue((MuscleIndex)i, IKPoseMuscles[i], ref ___humanPose.muscles);
//} }
____poseHandler.SetHumanPose(ref ___humanPose); ____poseHandler.SetHumanPose(ref ___humanPose);
//need IKSystem to see VRIK component for setup //need IKSystem to see VRIK component for setup
@ -130,102 +132,102 @@ class IKSystemPatches
} }
} }
private static readonly float[] TPoseMuscles = new float[] private static readonly float[] IKPoseMuscles = new float[]
{ {
0.00133321f,
8.195831E-06f,
8.537738E-07f,
-0.002669832f,
-7.651234E-06f,
-0.001659694f,
0f,
0f,
0f,
0.04213953f,
0.0003007996f,
-0.008032114f,
-0.03059979f,
-0.0003182998f,
0.009640567f,
0f, 0f,
0f, 0f,
0f, 0f,
0f, 0f,
0f, 0f,
0f, 0f,
0.5768794f,
0.01061097f,
-0.1127839f,
0.9705755f,
0.07972051f,
-0.0268422f,
0.007237188f,
0f, 0f,
0.5768792f,
0.01056608f,
-0.1127519f,
0.9705756f,
0.07971933f,
-0.02682396f,
0.007229362f,
0f, 0f,
0f, -5.651802E-06f,
0f, -3.034899E-07f,
0f, 0.4100508f,
0f, 0.3610304f,
0f, -0.0838329f,
0f, 0.9262537f,
0f, 0.1353517f,
0f, -0.03578902f,
0f, 0.06005657f,
0f, -4.95989E-06f,
0f, -1.43007E-06f,
0f, 0.4096187f,
0f, 0.363263f,
0.6001086f, -0.08205152f,
8.6213E-05f, 0.9250782f,
-0.0003308152f, 0.1345718f,
0.9999163f, -0.03572125f,
-9.559652E-06f, 0.06055461f,
3.41413E-08f, -1.079177f,
-3.415095E-06f, 0.2095419f,
-1.024528E-07f, 0.6140652f,
0.6001086f, 0.6365265f,
8.602679E-05f, 0.6683931f,
-0.0003311098f, -0.4764312f,
0.9999163f, 0.8099416f,
-9.510122E-06f, 0.8099371f,
1.707468E-07f, 0.6658203f,
-2.732077E-06f, -0.7327053f,
2.035554E-15f, 0.8113618f,
-2.748694E-07f, 0.8114051f,
2.619475E-07f, 0.6643661f,
0.401967f, -0.40341f,
0.3005583f, 0.8111364f,
0.04102772f, 0.8111367f,
0.9998822f, 0.6170399f,
-0.04634236f, -0.2524227f,
0.002522987f, 0.8138723f,
0.0003842837f, 0.8110135f,
-2.369134E-07f, -1.079171f,
-2.232262E-07f, 0.2095456f,
0.4019674f, 0.6140658f,
0.3005582f, 0.6365255f,
0.04103433f, 0.6683878f,
0.9998825f, -0.4764301f,
-0.04634996f, 0.8099402f,
0.00252335f, 0.8099376f,
0.000383302f, 0.6658241f,
-1.52127f, -0.7327023f,
0.2634507f, 0.8113653f,
0.4322457f, 0.8113793f,
0.6443988f, 0.664364f,
0.6669409f, -0.4034042f,
-0.4663372f, 0.811136f,
0.8116828f, 0.8111364f,
0.8116829f, 0.6170469f,
0.6678119f, -0.2524345f,
-0.6186608f, 0.8138595f,
0.8116842f, 0.8110138f
0.8116842f,
0.6677991f,
-0.619225f,
0.8116842f,
0.811684f,
0.6670032f,
-0.465875f,
0.811684f,
0.8116836f,
-1.520098f,
0.2613016f,
0.432256f,
0.6444503f,
0.6668426f,
-0.4670413f,
0.8116828f,
0.8116828f,
0.6677986f,
-0.6192409f,
0.8116841f,
0.811684f,
0.6677839f,
-0.6198869f,
0.8116839f,
0.8116838f,
0.6668782f,
-0.4667901f,
0.8116842f,
0.811684f
}; };
} }