HUD Defualts / Weapon Skew Fix / ScreenSize fix

This commit is contained in:
Simon 2020-04-27 23:48:11 +01:00
parent e7e5128d68
commit 2ac5e76ee5
2 changed files with 8 additions and 4 deletions

View file

@ -226,7 +226,7 @@ namespace s3d
OculusQuestMode::OculusQuestMode() OculusQuestMode::OculusQuestMode()
: leftEyeView(0) : leftEyeView(0)
, rightEyeView(1) , rightEyeView(1)
, sceneWidth(0), sceneHeight(0) , sceneWidth(0), sceneHeight(0), cachedScreenBlocks(0)
{ {
eye_ptrs.Push(&leftEyeView); eye_ptrs.Push(&leftEyeView);
eye_ptrs.Push(&rightEyeView); eye_ptrs.Push(&rightEyeView);
@ -289,6 +289,8 @@ namespace s3d
|| (vr_control_scheme >= 10 && hand == 0)) { || (vr_control_scheme >= 10 && hand == 0)) {
mat->translate(-weaponoffset[0], (hmdPosition[1] + weaponoffset[1] + vr_height_adjust) / pixelstretch, weaponoffset[2]); mat->translate(-weaponoffset[0], (hmdPosition[1] + weaponoffset[1] + vr_height_adjust) / pixelstretch, weaponoffset[2]);
mat->scale(1, 1 / pixelstretch, 1);
mat->rotate(-90 + (doomYaw - hmdorientation[YAW]) + weaponangles[YAW], 0, 1, 0); mat->rotate(-90 + (doomYaw - hmdorientation[YAW]) + weaponangles[YAW], 0, 1, 0);
mat->rotate(-weaponangles[PITCH], 1, 0, 0); mat->rotate(-weaponangles[PITCH], 1, 0, 0);
mat->rotate(-weaponangles[ROLL], 0, 0, 1); mat->rotate(-weaponangles[ROLL], 0, 0, 1);
@ -297,6 +299,8 @@ namespace s3d
{ {
mat->translate(-offhandoffset[0], (hmdPosition[1] + offhandoffset[1] + vr_height_adjust) / pixelstretch, offhandoffset[2]); mat->translate(-offhandoffset[0], (hmdPosition[1] + offhandoffset[1] + vr_height_adjust) / pixelstretch, offhandoffset[2]);
mat->scale(1, 1 / pixelstretch, 1);
mat->rotate(-90 + (doomYaw - hmdorientation[YAW]) + offhandangles[YAW], 0, 1, 0); mat->rotate(-90 + (doomYaw - hmdorientation[YAW]) + offhandangles[YAW], 0, 1, 0);
mat->rotate(-offhandangles[PITCH], 1, 0, 0); mat->rotate(-offhandangles[PITCH], 1, 0, 0);
mat->rotate(-offhandangles[ROLL], 0, 0, 1); mat->rotate(-offhandangles[ROLL], 0, 0, 1);
@ -583,7 +587,7 @@ namespace s3d
/* virtual */ /* virtual */
void OculusQuestMode::TearDown() const void OculusQuestMode::TearDown() const
{ {
if (gamestate == GS_LEVEL) { if (gamestate == GS_LEVEL && cachedScreenBlocks != 0) {
screenblocks = cachedScreenBlocks; screenblocks = cachedScreenBlocks;
} }
super::TearDown(); super::TearDown();

View file

@ -74,8 +74,8 @@ CVAR(Float, vr_quake_haptic_level, 0.8, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
//HUD control //HUD control
CVAR(Float, vr_hud_scale, 0.3f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Float, vr_hud_scale, 0.3f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_hud_stereo, 1.8f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Float, vr_hud_stereo, 1.5f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_hud_rotate, 35.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Float, vr_hud_rotate, 13.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_hud_fixed_pitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, vr_hud_fixed_pitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_hud_fixed_roll, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, vr_hud_fixed_roll, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)