mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2025-02-28 14:21:16 +00:00
Fix scope lerp issue
- Also disabled snap turn while in scope - Made sure VR menu options show when menu is shown
This commit is contained in:
parent
48d9cb9e7b
commit
8e82238395
5 changed files with 9 additions and 7 deletions
|
@ -139,7 +139,9 @@ void updateScopeAngles()
|
||||||
vec3_t angles;
|
vec3_t angles;
|
||||||
VectorSet(angles, vr.weaponangles[PITCH], vr.weaponangles[YAW], vr.hmdorientation[ROLL]);
|
VectorSet(angles, vr.weaponangles[PITCH], vr.weaponangles[YAW], vr.hmdorientation[ROLL]);
|
||||||
|
|
||||||
VectorLerp(currentScopeAngles, 0.125, angles, currentScopeAngles);
|
//Can't use lerp as the change from +180 to -180 causes a rapid spin!
|
||||||
|
//VectorLerp(currentScopeAngles, 0.125, angles, currentScopeAngles);
|
||||||
|
VectorCopy(angles, currentScopeAngles);
|
||||||
|
|
||||||
//Set "view" Angles
|
//Set "view" Angles
|
||||||
VectorCopy(currentScopeAngles, vr.hmdorientation);
|
VectorCopy(currentScopeAngles, vr.hmdorientation);
|
||||||
|
|
|
@ -535,8 +535,8 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
||||||
|
|
||||||
//No snap turn when using mounted gun
|
//No snap turn when using mounted gun
|
||||||
static int increaseSnap = true;
|
static int increaseSnap = true;
|
||||||
if (!vr.mountedgun) {
|
if (!vr.mountedgun && !vr.scopeengaged) {
|
||||||
if (pDominantTrackedRemoteNew->Joystick.x > 0.6f) {
|
if (pDominantTrackedRemoteNew->Joystick.x > 0.7f) {
|
||||||
if (increaseSnap) {
|
if (increaseSnap) {
|
||||||
snapTurn -= vr_snapturn_angle->value;
|
snapTurn -= vr_snapturn_angle->value;
|
||||||
if (vr_snapturn_angle->value > 10.0f) {
|
if (vr_snapturn_angle->value > 10.0f) {
|
||||||
|
@ -549,12 +549,12 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
||||||
|
|
||||||
RTCWVR_ResyncClientYawWithGameYaw();
|
RTCWVR_ResyncClientYawWithGameYaw();
|
||||||
}
|
}
|
||||||
} else if (pDominantTrackedRemoteNew->Joystick.x < 0.4f) {
|
} else if (pDominantTrackedRemoteNew->Joystick.x < 0.3f) {
|
||||||
increaseSnap = true;
|
increaseSnap = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decreaseSnap = true;
|
static int decreaseSnap = true;
|
||||||
if (pDominantTrackedRemoteNew->Joystick.x < -0.6f) {
|
if (pDominantTrackedRemoteNew->Joystick.x < -0.7f) {
|
||||||
if (decreaseSnap) {
|
if (decreaseSnap) {
|
||||||
snapTurn += vr_snapturn_angle->value;
|
snapTurn += vr_snapturn_angle->value;
|
||||||
|
|
||||||
|
@ -569,7 +569,7 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
||||||
|
|
||||||
RTCWVR_ResyncClientYawWithGameYaw();
|
RTCWVR_ResyncClientYawWithGameYaw();
|
||||||
}
|
}
|
||||||
} else if (pDominantTrackedRemoteNew->Joystick.x > -0.4f) {
|
} else if (pDominantTrackedRemoteNew->Joystick.x > -0.3f) {
|
||||||
decreaseSnap = true;
|
decreaseSnap = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ menuDef
|
||||||
setitemcolor fadebox backcolor 0 0 0 1;
|
setitemcolor fadebox backcolor 0 0 0 1;
|
||||||
fadeout fadebox;
|
fadeout fadebox;
|
||||||
hide grpControls;
|
hide grpControls;
|
||||||
show look;
|
show vr;
|
||||||
uiScript loadControls
|
uiScript loadControls
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue