mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[PlaySpaceScaleFix] Fix inverted player offset.
This commit is contained in:
parent
de33e5432e
commit
e0507cf1a6
1 changed files with 7 additions and 4 deletions
|
@ -25,17 +25,20 @@ class PlayerSetupPatches
|
||||||
Vector3 newPosition = __instance.vrCamera.transform.position;
|
Vector3 newPosition = __instance.vrCamera.transform.position;
|
||||||
newPosition.y = __instance.transform.position.y;
|
newPosition.y = __instance.transform.position.y;
|
||||||
|
|
||||||
Vector3 offset = __state + newPosition;
|
Vector3 offset = newPosition - __state;
|
||||||
|
|
||||||
// Offset _PlayerLocal to keep player in place
|
// Offset _PlayerLocal to keep player in place
|
||||||
__instance.transform.position += offset;
|
__instance.transform.position -= offset;
|
||||||
|
|
||||||
// TODO: Figure out why VRIK is wonky still
|
// TODO: Figure out why VRIK is wonky still
|
||||||
|
// PlayerSetup runs after VRIK solving?? Fuck
|
||||||
|
/**
|
||||||
if (IKSystem.vrik != null)
|
if (IKSystem.vrik != null)
|
||||||
{
|
{
|
||||||
IKSystem.vrik.solver.locomotion.AddDeltaPosition(offset);
|
|
||||||
IKSystem.vrik.solver.raycastOriginPelvis += offset;
|
|
||||||
IKSystem.vrik.transform.position += offset;
|
IKSystem.vrik.transform.position += offset;
|
||||||
|
IKSystem.vrik.solver.Reset();
|
||||||
|
IKSystem.vrik.solver.AddPlatformMotion(offset, Quaternion.identity, __instance.transform.position);
|
||||||
}
|
}
|
||||||
|
**/
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue