mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 06:49:22 +00:00
push what i have
This commit is contained in:
parent
dc2916e8e6
commit
d77afcc009
16 changed files with 496 additions and 91 deletions
|
@ -1,6 +1,5 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Systems.MovementSystem;
|
||||
using RootMotion.FinalIK;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.AlternateIKSystem.IK;
|
||||
|
@ -54,6 +53,11 @@ public class BodyControl
|
|||
|
||||
#region Public Methods
|
||||
|
||||
public void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
TrackingAll = ShouldTrackAll();
|
||||
|
@ -88,60 +92,4 @@ public class BodyControl
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Solver Weight Helpers
|
||||
|
||||
// I am unsure on this...?
|
||||
|
||||
public static void SetLookAtWeight(LookAtIK lookAtIk, float weight)
|
||||
{
|
||||
if (lookAtIk != null)
|
||||
lookAtIk.solver.IKPositionWeight = weight;
|
||||
}
|
||||
|
||||
public static void SetHeadWeight(IKSolverVR.Spine spine, float weight)
|
||||
{
|
||||
spine.positionWeight = weight;
|
||||
spine.rotationWeight = weight;
|
||||
}
|
||||
|
||||
public static void SetArmWeight(IKSolverVR.Arm arm, float weight)
|
||||
{
|
||||
arm.positionWeight = weight;
|
||||
arm.rotationWeight = weight;
|
||||
//arm.shoulderRotationWeight = weight;
|
||||
//arm.shoulderTwistWeight = weight;
|
||||
arm.bendGoalWeight = arm.bendGoal != null ? weight : 0f;
|
||||
}
|
||||
|
||||
public static void SetLegWeight(IKSolverVR.Leg leg, float weight)
|
||||
{
|
||||
leg.positionWeight = weight;
|
||||
leg.rotationWeight = weight;
|
||||
leg.bendGoalWeight = leg.usingKneeTracker ? weight : 0f;
|
||||
}
|
||||
|
||||
public static void SetPelvisWeight(IKSolverVR.Spine spine, float weight)
|
||||
{
|
||||
spine.pelvisPositionWeight = weight;
|
||||
spine.pelvisRotationWeight = weight;
|
||||
}
|
||||
|
||||
public static void SetLocomotionWeight(IKSolverVR.Locomotion locomotion, float weight)
|
||||
{
|
||||
locomotion.weight = weight;
|
||||
}
|
||||
|
||||
public static void SetIKPositionWeight(IKSolverVR solver, float weight)
|
||||
{
|
||||
solver.IKPositionWeight = weight;
|
||||
}
|
||||
|
||||
public static void SetIKPositionWeight(LookAtIK lookAtIk, float weight)
|
||||
{
|
||||
if (lookAtIk != null)
|
||||
lookAtIk.solver.IKPositionWeight = weight;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue