mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-10 06:42:17 +00:00
Pico Saber Defaults
This commit is contained in:
parent
bc6b23786e
commit
453c2fd749
2 changed files with 23 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue