mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-04 23:39:22 +00:00
[DesktopVRIK] Cleanup
This commit is contained in:
parent
497b0b0e7a
commit
32456e0055
5 changed files with 17 additions and 17 deletions
|
@ -142,6 +142,7 @@ internal abstract class IKHandler
|
|||
public virtual void Reset()
|
||||
{
|
||||
_ikSimulatedRootAngle = _vrik.transform.eulerAngles.y;
|
||||
|
||||
if(ModSettings.EntryResetFootstepsOnIdle.Value)
|
||||
VRIKUtils.ResetToInitialFootsteps(_vrik, _locomotionData, _scaleDifference);
|
||||
|
||||
|
|
|
@ -115,14 +115,10 @@ internal class IKHandlerDesktop : IKHandler
|
|||
|
||||
private void ResetSolverIfNeeded()
|
||||
{
|
||||
if (_wasTrackingLocomotion == BodySystem.TrackingLocomotionEnabled)
|
||||
return;
|
||||
|
||||
if (_wasTrackingLocomotion == BodySystem.TrackingLocomotionEnabled) return;
|
||||
_wasTrackingLocomotion = BodySystem.TrackingLocomotionEnabled;
|
||||
if (ModSettings.EntryResetFootstepsOnIdle.Value)
|
||||
VRIKUtils.ResetToInitialFootsteps(_vrik, _locomotionData, _scaleDifference);
|
||||
|
||||
_solver.Reset();
|
||||
Reset();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -61,10 +61,7 @@ public class IKManager : MonoBehaviour
|
|||
|
||||
private void Update()
|
||||
{
|
||||
if (_ikHandler == null)
|
||||
return;
|
||||
|
||||
_ikHandler.UpdateWeights();
|
||||
_ikHandler?.UpdateWeights();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -214,6 +211,11 @@ public class IKManager : MonoBehaviour
|
|||
|
||||
#region Public Methods
|
||||
|
||||
public bool IsAvatarInitialized()
|
||||
{
|
||||
return _isAvatarInitialized;
|
||||
}
|
||||
|
||||
public Vector3 GetPlayerPosition()
|
||||
{
|
||||
if (!MetaPort.Instance.isUsingVr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue