mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[AvatarScaleMod] Remove PlaySpaceScaleFix
This commit is contained in:
parent
acacc21050
commit
84fe655eb5
2 changed files with 6 additions and 30 deletions
|
@ -25,36 +25,6 @@ class PlayerSetupPatches
|
|||
AvatarScaleMod.Logger.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
static Vector3 originalPosition;
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetPlaySpaceScale))]
|
||||
static void Prefix_PlayerSetup_SetPlaySpaceScale(ref PlayerSetup __instance)
|
||||
{
|
||||
originalPosition = __instance.vrCamera.transform.position;
|
||||
originalPosition.y = __instance.transform.position.y;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetPlaySpaceScale))]
|
||||
static void Postfix_PlayerSetup_SetPlaySpaceScale(ref PlayerSetup __instance)
|
||||
{
|
||||
Vector3 newPosition = __instance.vrCamera.transform.position;
|
||||
newPosition.y = __instance.transform.position.y;
|
||||
|
||||
Vector3 offset = newPosition - originalPosition;
|
||||
|
||||
// Apply the offset to the VR camera rig's position
|
||||
__instance.transform.position -= offset;
|
||||
|
||||
//if (IKSystem.vrik != null)
|
||||
//{
|
||||
// IKSystem.vrik.solver.locomotion.AddDeltaPosition(offset * 2);
|
||||
// IKSystem.vrik.solver.raycastOriginPelvis += offset * 2;
|
||||
// IKSystem.vrik.solver.Reset();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
class PuppetMasterPatches
|
||||
|
|
|
@ -67,6 +67,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControllerFreeze", "Control
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FuckCohtmlResourceHandler", "FuckCohtmlResourceHandler\FuckCohtmlResourceHandler.csproj", "{EB73DB1B-62BD-4258-BA85-D3ACAB7CBE91}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlaySpaceScaleFix", "PlaySpaceScaleFix\PlaySpaceScaleFix.csproj", "{61368493-5B0E-489B-828C-DE10428AB81A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -201,6 +203,10 @@ Global
|
|||
{EB73DB1B-62BD-4258-BA85-D3ACAB7CBE91}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB73DB1B-62BD-4258-BA85-D3ACAB7CBE91}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB73DB1B-62BD-4258-BA85-D3ACAB7CBE91}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{61368493-5B0E-489B-828C-DE10428AB81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{61368493-5B0E-489B-828C-DE10428AB81A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{61368493-5B0E-489B-828C-DE10428AB81A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{61368493-5B0E-489B-828C-DE10428AB81A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue