ASTExtension: Added IsGripping check for Knuckles

This commit is contained in:
NotAKidoS 2024-07-01 23:05:14 -05:00
parent 0cdcc3d671
commit a5140ade91

View file

@ -406,6 +406,9 @@ public class ASTExtensionMod : MelonMod
if (!EntryUseScaleGesture.Value)
return;
if (!IsGripping()) // knuckles controllers dont need grip to do Fist gesture
return;
modifier = Mathf.Max(modifier, 0.01f); // no zero
@ -432,6 +435,12 @@ public class ASTExtensionMod : MelonMod
SetAvatarHeight(targetHeight);
}
private static bool IsGripping()
{
return CVRInputManager.Instance.gripLeftValue > 0.50f ||
CVRInputManager.Instance.gripRightValue > 0.50f;
}
private static bool AreBothTriggersDown()
{
// Maybe it should be one trigger? Imagine XSOverlay scaling but for player.