mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[EzCurls] Added EntryOnlySmoothNearbyCurl test option
This commit is contained in:
parent
623df261b0
commit
6fc809692d
2 changed files with 38 additions and 12 deletions
|
@ -16,6 +16,7 @@ internal class InputModuleCurlAdjuster : CVRInputModule
|
||||||
// Curl smoothing/averaging
|
// Curl smoothing/averaging
|
||||||
public bool UseCurlSmoothing = false;
|
public bool UseCurlSmoothing = false;
|
||||||
public bool DontSmoothExtremes = true;
|
public bool DontSmoothExtremes = true;
|
||||||
|
public bool OnlySmoothNearbyCurl = false;
|
||||||
public float CurlSimilarityThreshold = 0.5f;
|
public float CurlSimilarityThreshold = 0.5f;
|
||||||
public float CurlSmoothingFactor = 0.5f;
|
public float CurlSmoothingFactor = 0.5f;
|
||||||
|
|
||||||
|
@ -36,19 +37,38 @@ internal class InputModuleCurlAdjuster : CVRInputModule
|
||||||
|
|
||||||
if (UseCurlSmoothing)
|
if (UseCurlSmoothing)
|
||||||
{
|
{
|
||||||
SmoothCurls(
|
if (OnlySmoothNearbyCurl)
|
||||||
ref _inputManager.fingerCurlLeftIndex,
|
{
|
||||||
ref _inputManager.fingerCurlLeftMiddle,
|
SmoothCurlsNear(
|
||||||
ref _inputManager.fingerCurlLeftRing,
|
ref _inputManager.fingerCurlLeftIndex,
|
||||||
ref _inputManager.fingerCurlLeftPinky
|
ref _inputManager.fingerCurlLeftMiddle,
|
||||||
);
|
ref _inputManager.fingerCurlLeftRing,
|
||||||
|
ref _inputManager.fingerCurlLeftPinky
|
||||||
|
);
|
||||||
|
|
||||||
SmoothCurls(
|
SmoothCurlsNear(
|
||||||
ref _inputManager.fingerCurlRightIndex,
|
ref _inputManager.fingerCurlRightIndex,
|
||||||
ref _inputManager.fingerCurlRightMiddle,
|
ref _inputManager.fingerCurlRightMiddle,
|
||||||
ref _inputManager.fingerCurlRightRing,
|
ref _inputManager.fingerCurlRightRing,
|
||||||
ref _inputManager.fingerCurlRightPinky
|
ref _inputManager.fingerCurlRightPinky
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SmoothCurls(
|
||||||
|
ref _inputManager.fingerCurlLeftIndex,
|
||||||
|
ref _inputManager.fingerCurlLeftMiddle,
|
||||||
|
ref _inputManager.fingerCurlLeftRing,
|
||||||
|
ref _inputManager.fingerCurlLeftPinky
|
||||||
|
);
|
||||||
|
|
||||||
|
SmoothCurls(
|
||||||
|
ref _inputManager.fingerCurlRightIndex,
|
||||||
|
ref _inputManager.fingerCurlRightMiddle,
|
||||||
|
ref _inputManager.fingerCurlRightRing,
|
||||||
|
ref _inputManager.fingerCurlRightPinky
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UseCurlSnapping)
|
if (UseCurlSnapping)
|
||||||
|
|
|
@ -31,6 +31,11 @@ public class EzCurls : MelonMod
|
||||||
Category.CreateEntry("UseCurlSmoothing", false,
|
Category.CreateEntry("UseCurlSmoothing", false,
|
||||||
description: "Finger curl smoothing to average out similar finger positions.");
|
description: "Finger curl smoothing to average out similar finger positions.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryOnlySmoothNearbyCurl =
|
||||||
|
Category.CreateEntry("OnlySmoothNearbyCurl", false,
|
||||||
|
description: "Should the curl smoothing only influence the nearest curl?");
|
||||||
|
|
||||||
|
|
||||||
public static readonly MelonPreferences_Entry<bool> EntryDontSmoothExtremes =
|
public static readonly MelonPreferences_Entry<bool> EntryDontSmoothExtremes =
|
||||||
Category.CreateEntry("DontSmoothExtremes", true,
|
Category.CreateEntry("DontSmoothExtremes", true,
|
||||||
description: "Should the finger curl smoothing be less effective on curls towards 0 or 1?");
|
description: "Should the finger curl smoothing be less effective on curls towards 0 or 1?");
|
||||||
|
@ -67,6 +72,7 @@ public class EzCurls : MelonMod
|
||||||
|
|
||||||
// curl smoothing
|
// curl smoothing
|
||||||
InputModuleCurlAdjuster.Instance.UseCurlSmoothing = EntryUseCurlSmoothing.Value;
|
InputModuleCurlAdjuster.Instance.UseCurlSmoothing = EntryUseCurlSmoothing.Value;
|
||||||
|
InputModuleCurlAdjuster.Instance.OnlySmoothNearbyCurl = EntryOnlySmoothNearbyCurl.Value;
|
||||||
InputModuleCurlAdjuster.Instance.DontSmoothExtremes = EntryDontSmoothExtremes.Value;
|
InputModuleCurlAdjuster.Instance.DontSmoothExtremes = EntryDontSmoothExtremes.Value;
|
||||||
InputModuleCurlAdjuster.Instance.CurlSimilarityThreshold = EntryCurlSimilarityThreshold.Value;
|
InputModuleCurlAdjuster.Instance.CurlSimilarityThreshold = EntryCurlSimilarityThreshold.Value;
|
||||||
InputModuleCurlAdjuster.Instance.CurlSmoothingFactor = EntryCurlSmoothingFactor.Value;
|
InputModuleCurlAdjuster.Instance.CurlSmoothingFactor = EntryCurlSmoothingFactor.Value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue