mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
why is it fucking (literally()
fucking one line
This commit is contained in:
parent
6c3a1797b5
commit
41068ce3fb
4 changed files with 16 additions and 8 deletions
|
@ -18,6 +18,7 @@ public class DesktopVRIK : MonoBehaviour
|
||||||
Setting_EmoteVRIK,
|
Setting_EmoteVRIK,
|
||||||
Setting_EmoteLookAtIK;
|
Setting_EmoteLookAtIK;
|
||||||
public static float Setting_EmulateVRChatHipMovementWeight;
|
public static float Setting_EmulateVRChatHipMovementWeight;
|
||||||
|
public static float Setting_HipThrustMultiplier = 0.1f;
|
||||||
|
|
||||||
public Transform viewpoint;
|
public Transform viewpoint;
|
||||||
public Vector3 initialCamPos;
|
public Vector3 initialCamPos;
|
||||||
|
@ -60,12 +61,15 @@ public class DesktopVRIK : MonoBehaviour
|
||||||
IKSystem.vrik.transform.localPosition = Vector3.zero;
|
IKSystem.vrik.transform.localPosition = Vector3.zero;
|
||||||
IKSystem.vrik.transform.localRotation = Quaternion.identity;
|
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
|
//VRChat hip movement emulation
|
||||||
if (Setting_EmulateVRChatHipMovementWeight != 0)
|
if (Setting_EmulateVRChatHipMovementWeight != 0)
|
||||||
{
|
{
|
||||||
float angle = PlayerSetup.Instance.desktopCamera.transform.localEulerAngles.x;
|
float angle = PlayerSetup.Instance.desktopCamera.transform.localEulerAngles.x;
|
||||||
if (angle > 180) angle -= 360;
|
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);
|
Quaternion rotation = Quaternion.AngleAxis(leanAmount, IKSystem.Instance.avatar.transform.right);
|
||||||
IKSystem.vrik.solver.AddRotationOffset(IKSolverVR.RotationOffset.Head, rotation);
|
IKSystem.vrik.solver.AddRotationOffset(IKSolverVR.RotationOffset.Head, rotation);
|
||||||
}
|
}
|
||||||
|
@ -110,9 +114,13 @@ public class DesktopVRIK : MonoBehaviour
|
||||||
vrik.solver.locomotion.angleThreshold = 30f;
|
vrik.solver.locomotion.angleThreshold = 30f;
|
||||||
vrik.solver.locomotion.maxLegStretch = 0.75f;
|
vrik.solver.locomotion.maxLegStretch = 0.75f;
|
||||||
//nuke weights
|
//nuke weights
|
||||||
vrik.solver.spine.headClampWeight = 0f;
|
vrik.solver.spine.headClampWeight = 1f;
|
||||||
vrik.solver.spine.minHeadHeight = 0f;
|
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.positionWeight = 0f;
|
||||||
vrik.solver.leftArm.rotationWeight = 0f;
|
vrik.solver.leftArm.rotationWeight = 0f;
|
||||||
vrik.solver.rightArm.positionWeight = 0f;
|
vrik.solver.rightArm.positionWeight = 0f;
|
||||||
|
@ -128,6 +136,7 @@ public class DesktopVRIK : MonoBehaviour
|
||||||
BodySystem.TrackingRightArmEnabled = false;
|
BodySystem.TrackingRightArmEnabled = false;
|
||||||
BodySystem.TrackingLeftLegEnabled = false;
|
BodySystem.TrackingLeftLegEnabled = false;
|
||||||
BodySystem.TrackingRightLegEnabled = false;
|
BodySystem.TrackingRightLegEnabled = false;
|
||||||
|
BodySystem.TrackingPositionWeight = 0f;
|
||||||
IKSystem.Instance.headAnchorRotationOffset = Vector3.zero;
|
IKSystem.Instance.headAnchorRotationOffset = Vector3.zero;
|
||||||
IKSystem.Instance.headAnchorPositionOffset = Vector3.zero;
|
IKSystem.Instance.headAnchorPositionOffset = Vector3.zero;
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,6 @@ 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)
|
||||||
{
|
{
|
||||||
//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)
|
||||||
{
|
{
|
||||||
____poseHandler = new HumanPoseHandler(IKSystem.Instance.animator.avatar, IKSystem.Instance.animator.transform);
|
____poseHandler = new HumanPoseHandler(IKSystem.Instance.animator.avatar, IKSystem.Instance.animator.transform);
|
||||||
|
|
|
@ -26,6 +26,6 @@ using System.Reflection;
|
||||||
namespace DesktopVRIK.Properties;
|
namespace DesktopVRIK.Properties;
|
||||||
internal static class AssemblyInfoParams
|
internal static class AssemblyInfoParams
|
||||||
{
|
{
|
||||||
public const string Version = "2.0.1";
|
public const string Version = "2.0.2";
|
||||||
public const string Author = "NotAKidoS";
|
public const string Author = "NotAKidoS";
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_id": 117,
|
"_id": 117,
|
||||||
"name": "DesktopVRIK",
|
"name": "DesktopVRIK",
|
||||||
"modversion": "2.0.1",
|
"modversion": "2.0.2",
|
||||||
"gameversion": "2022r170",
|
"gameversion": "2022r170",
|
||||||
"loaderversion": "0.5.7",
|
"loaderversion": "0.5.7",
|
||||||
"modtype": "Mod",
|
"modtype": "Mod",
|
||||||
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"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/",
|
"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"
|
"embedcolor": "9b59b6"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue