Pico Saber Defaults

This commit is contained in:
Grant Bagwell 2023-12-14 23:22:20 +01:00
parent bc6b23786e
commit 453c2fd749
2 changed files with 23 additions and 2 deletions

View file

@ -138,7 +138,18 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
//If we are in a saberBlockDebounce thing then add on an angle
//Lerped upon how far from the start of the saber move
//Index default -> vr_saber_pitchadjust->value = -2.42187500
rotation[PITCH] = vr_saber_pitchadjust->value + (gAppState.controllersPresent == INDEX_CONTROLLERS ? 10.938125f : 0.0f);
rotation[PITCH] = vr_saber_pitchadjust->value;
//Individual Controller offsets (so that they match quest)
if (gAppState.controllersPresent == INDEX_CONTROLLERS)
{
rotation[PITCH] += 10.938125f;
}
else if (gAppState.controllersPresent == PICO_CONTROLLERS)
{
rotation[PITCH] += 12.500625f;
}
if (vr.saberBlockDebounce > cl.serverTime) {
float lerp = 0.0f;
//Where are we in the lerp

View file

@ -45,7 +45,17 @@ void HandleInput_WeaponAlign( ovrInputStateTrackedRemote *pDominantTrackedRemote
//if we are in saber block debounce, don't update the saber angles
if (vr.saberBlockDebounce < cl.serverTime) {
rotation[PITCH] = vr_saber_pitchadjust->value + (gAppState.controllersPresent == INDEX_CONTROLLERS ? 10.938125f : 0.0f);
rotation[PITCH] = vr_saber_pitchadjust->value;
//Individual Controller offsets (so that they match quest)
if (gAppState.controllersPresent == INDEX_CONTROLLERS)
{
rotation[PITCH] += 10.938125f;
}
else if (gAppState.controllersPresent == PICO_CONTROLLERS)
{
rotation[PITCH] += 12.500625f;
}
QuatToYawPitchRoll(pDominantTracking->GripPose.orientation, rotation, vr.weaponangles[ANGLES_SABER]);
QuatToYawPitchRoll(pOffTracking->GripPose.orientation, rotation, vr.offhandangles[ANGLES_SABER]);
}