mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
halfbody hip direction fix
This commit is contained in:
parent
8ddea91194
commit
a563c0ad01
1 changed files with 5 additions and 12 deletions
|
@ -53,7 +53,8 @@ internal static class BodySystemPatches
|
||||||
|
|
||||||
// Allow avatar to rotate seperatly from Player (Desktop&VR)
|
// Allow avatar to rotate seperatly from Player (Desktop&VR)
|
||||||
// FBT needs avatar root to follow head
|
// FBT needs avatar root to follow head
|
||||||
solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 180f;
|
// VR default is 25 degrees
|
||||||
|
solver.spine.maxRootAngle = BodySystem.isCalibratedAsFullBody ? 0f : 25f;
|
||||||
|
|
||||||
if (BodySystem.TrackingEnabled)
|
if (BodySystem.TrackingEnabled)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +74,7 @@ internal static class BodySystemPatches
|
||||||
if (BodySystem.isCalibratedAsFullBody)
|
if (BodySystem.isCalibratedAsFullBody)
|
||||||
{
|
{
|
||||||
bool isRunning = BodySystem.PlayRunningAnimationInFullBody && MovementSystem.Instance.movementVector.magnitude > 0f;
|
bool isRunning = BodySystem.PlayRunningAnimationInFullBody && MovementSystem.Instance.movementVector.magnitude > 0f;
|
||||||
SetPelvisWeight(solver.spine, isRunning ? 0f : 1f);
|
if (isRunning) SetPelvisWeight(solver.spine, 0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -131,16 +132,8 @@ internal static class BodySystemPatches
|
||||||
void SetPelvisWeight(IKSolverVR.Spine spine, float weight)
|
void SetPelvisWeight(IKSolverVR.Spine spine, float weight)
|
||||||
{
|
{
|
||||||
// looks better when hips are disabled while running
|
// looks better when hips are disabled while running
|
||||||
if (spine.pelvisTarget != null)
|
spine.pelvisPositionWeight = weight;
|
||||||
{
|
spine.pelvisRotationWeight = weight;
|
||||||
spine.pelvisPositionWeight = weight;
|
|
||||||
spine.pelvisRotationWeight = weight;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
spine.pelvisPositionWeight = 0f;
|
|
||||||
spine.pelvisRotationWeight = 0f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue