mirror of
https://github.com/astromaddie/lambda1-vr.git
synced 2026-10-29 02:00:17 +01:00
Fix positional tracking when crouched
This commit is contained in:
1 parent
09e020f7e3
commit
86e73306bf
5 files changed
+21
-1
No files matched your search
@@ -1394,7 +1394,7 @@ void VR_Init()
|
||||
vr_flashlight_model = Cvar_Get( "vr_flashlight_model", "1", CVAR_ARCHIVE, "Set to 0 to prevent drawing the flashlight model" );
|
||||
vr_mirror_weapons = Cvar_Get( "vr_mirror_weapons", "0", CVAR_ARCHIVE, "Set to 1 to mirror the weapon models (for left handed use)" );
|
||||
vr_weapon_backface_culling = Cvar_Get( "vr_weapon_backface_culling", "0", CVAR_ARCHIVE, "Use to enable whether back face culling is used on weapon viewmodel" );
|
||||
vr_comfort_mask = Cvar_Get( "vr_comfort_mask", "0.75", CVAR_ARCHIVE, "Use to reduce motion sickness, 0.0 is off, 1.0 is fully obscured, probably go with 0.7, anything less than 0.5 is barely visible" );
|
||||
vr_comfort_mask = Cvar_Get( "vr_comfort_mask", "0.0", CVAR_ARCHIVE, "Use to reduce motion sickness, 0.0 is off, 1.0 is fully obscured, probably go with 0.7, anything less than 0.5 is barely visible" );
|
||||
|
||||
//Not to be changed by users, as it will be overwritten anyway
|
||||
vr_stereo_side = Cvar_Get( "vr_stereo_side", "0", CVAR_READ_ONLY, "Eye being drawn" );
|
||||
|
||||
@@ -246,6 +246,11 @@ void HandleInput_Left( ovrMobile * Ovr, double displayTime )
|
||||
float multiplier = vr_positional_factor->value / (cl_forwardspeed->value *
|
||||
((rightTrackedRemoteState_new.Buttons & ovrButton_Trigger) ? cl_movespeedkey->value : 1.0f));
|
||||
|
||||
if (ducked != DUCK_NOTDUCKED)
|
||||
{
|
||||
multiplier *= 3.0f;
|
||||
}
|
||||
|
||||
vec2_t v;
|
||||
rotateAboutOrigin(-positionDeltaThisFrame[0] * multiplier,
|
||||
positionDeltaThisFrame[2] * multiplier, -hmdorientation[YAW], v);
|
||||
|
||||
@@ -247,6 +247,11 @@ void HandleInput_LeftAlt( ovrMobile * Ovr, double displayTime )
|
||||
float multiplier = vr_positional_factor->value / (cl_forwardspeed->value *
|
||||
((rightTrackedRemoteState_new.Buttons & ovrButton_Trigger) ? cl_movespeedkey->value : 1.0f));
|
||||
|
||||
if (ducked != DUCK_NOTDUCKED)
|
||||
{
|
||||
multiplier *= 3.0f;
|
||||
}
|
||||
|
||||
vec2_t v;
|
||||
rotateAboutOrigin(-positionDeltaThisFrame[0] * multiplier,
|
||||
positionDeltaThisFrame[2] * multiplier, -hmdorientation[YAW], v);
|
||||
|
||||
@@ -243,6 +243,11 @@ void HandleInput_Right(ovrMobile * Ovr, double displayTime )
|
||||
float multiplier = vr_positional_factor->value / (cl_forwardspeed->value *
|
||||
((leftTrackedRemoteState_new.Buttons & ovrButton_Trigger) ? cl_movespeedkey->value : 1.0f));
|
||||
|
||||
if (ducked != DUCK_NOTDUCKED)
|
||||
{
|
||||
multiplier *= 3.0f;
|
||||
}
|
||||
|
||||
vec2_t v;
|
||||
rotateAboutOrigin(-positionDeltaThisFrame[0] * multiplier,
|
||||
positionDeltaThisFrame[2] * multiplier, -hmdorientation[YAW], v);
|
||||
|
||||
@@ -231,6 +231,11 @@ void HandleInput_RightAlt(ovrMobile * Ovr, double displayTime )
|
||||
float multiplier = vr_positional_factor->value / (cl_forwardspeed->value *
|
||||
((leftTrackedRemoteState_new.Buttons & ovrButton_Trigger) ? cl_movespeedkey->value : 1.0f));
|
||||
|
||||
if (ducked != DUCK_NOTDUCKED)
|
||||
{
|
||||
multiplier *= 3.0f;
|
||||
}
|
||||
|
||||
vec2_t v;
|
||||
rotateAboutOrigin(-positionDeltaThisFrame[0] * multiplier,
|
||||
positionDeltaThisFrame[2] * multiplier, -hmdorientation[YAW], v);
|
||||
|
||||
Reference in new issue
Block a user