mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 14:59:23 +00:00
[DesktopVRIK] Fixed an issue where tracking status would update a frame late
This commit is contained in:
parent
02d6c7ec89
commit
d3db894acf
6 changed files with 61 additions and 35 deletions
|
@ -80,11 +80,12 @@ internal abstract class IKHandler
|
|||
Update_PelvisWeight();
|
||||
|
||||
Update_LocomotionWeight();
|
||||
ResetSolverIfNeeded();
|
||||
|
||||
Update_IKPositionWeight();
|
||||
}
|
||||
|
||||
public virtual void UpdateTracking() { }
|
||||
|
||||
protected virtual void Update_HeadWeight()
|
||||
{
|
||||
// There is no Head tracking setting
|
||||
|
@ -153,17 +154,5 @@ internal abstract class IKHandler
|
|||
return isTracking && hasTarget ? 1f : 0f;
|
||||
}
|
||||
|
||||
private void ResetSolverIfNeeded()
|
||||
{
|
||||
if (_wasTrackingLocomotion == BodySystem.TrackingLocomotionEnabled)
|
||||
return;
|
||||
|
||||
_wasTrackingLocomotion = BodySystem.TrackingLocomotionEnabled;
|
||||
if (ModSettings.EntryResetFootstepsOnIdle.Value)
|
||||
VRIKUtils.ResetToInitialFootsteps(_vrik, _locomotionData, _scaleDifference);
|
||||
|
||||
_solver.Reset();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue