mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-04 07:19:22 +00:00
[IKFixes] oops
This commit is contained in:
parent
bc8cc7a1ad
commit
9bce6120df
3 changed files with 10 additions and 23 deletions
|
@ -253,6 +253,11 @@ internal static class BodySystemPatches
|
|||
IKSystem.vrik.solver.rightLeg.bendGoalWeight = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void OffsetSimulatedRootAngle(float deltaRotation)
|
||||
{
|
||||
_ikSimulatedRootAngle = Mathf.Repeat(_ikSimulatedRootAngle + deltaRotation, 360f);
|
||||
}
|
||||
}
|
||||
|
||||
internal static class IKSystemPatches
|
||||
|
@ -295,7 +300,10 @@ internal static class PlayerSetupPatches
|
|||
|
||||
// Prevent targeting previous movement parent
|
||||
if (lastMovementParent == currentParent || lastMovementParent == null)
|
||||
{
|
||||
IKSystem.vrik.solver.AddPlatformMotion(deltaPosition, deltaRotation, currentPosition);
|
||||
BodySystemPatches.OffsetSimulatedRootAngle(deltaRotation.eulerAngles.y);
|
||||
}
|
||||
|
||||
lastMovementParent = currentParent;
|
||||
lastMovementPosition = currentPosition;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue