Fix for Unity 6 branch

This commit is contained in:
SDraw 2025-02-15 18:07:58 +03:00
parent 1e0e6449d6
commit b92d54c162
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
17 changed files with 36 additions and 80 deletions

View file

@ -49,16 +49,12 @@ namespace ml_prm
public static bool IsLeftGrabPointerActive(this PuppetMaster p_source)
{
bool l_result = ((p_source._playerAvatarMovementDataCurrent.AnimatorGestureLeft >= 0.5f) && (p_source._playerAvatarMovementDataCurrent.AnimatorGestureLeft <= 1f));
l_result |= ((FingerSystem.GetCurlNormalized(p_source._playerAvatarMovementDataCurrent.LeftMiddle1Stretched) >= 0.5f) && (FingerSystem.GetCurlNormalized(p_source._playerAvatarMovementDataCurrent.LeftMiddle2Stretched) >= 0.5f) && (FingerSystem.GetCurlNormalized(p_source._playerAvatarMovementDataCurrent.LeftMiddle3Stretched) >= 0.5f));
return l_result;
return p_source._playerAvatarMovementDataCurrent.IsLeftHandGrabbing();
}
public static bool IsRightGrabPointerActive(this PuppetMaster p_source)
{
bool l_result = ((p_source._playerAvatarMovementDataCurrent.AnimatorGestureRight >= 0.5f) && (p_source._playerAvatarMovementDataCurrent.AnimatorGestureRight <= 1f));
l_result |= ((FingerSystem.GetCurlNormalized(p_source._playerAvatarMovementDataCurrent.RightMiddle1Stretched) >= 0.5f) && (FingerSystem.GetCurlNormalized(p_source._playerAvatarMovementDataCurrent.RightMiddle2Stretched) >= 0.5f) && (FingerSystem.GetCurlNormalized(p_source._playerAvatarMovementDataCurrent.RightMiddle3Stretched) >= 0.5f));
return l_result;
return p_source._playerAvatarMovementDataCurrent.IsRightHandGrabbing();
}
public static CVRSeat GetCurrentSeat(this BetterBetterCharacterController p_instance) => (ms_lastCVRSeat?.GetValue(p_instance) as CVRSeat);