Corrected positional movement on Quest 2

This commit is contained in:
Simon committed 2021-01-26 22:52:39 +00:00
1 parent 4d001d7f75
commit e8250ffdbf
5 files changed
+11 -6

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.lambda1vr"
android:versionCode="26"
android:versionName="1.4.8" android:installLocation="auto" >
android:versionCode="27"
android:versionName="1.4.9" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
@@ -1476,8 +1476,10 @@ void * AppThreadFunction( void * parm )
m_width=vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ) * SS_MULTIPLIER;
m_height=m_width;
hmdType = vrapi_GetSystemPropertyInt(&java, VRAPI_SYS_PROP_DEVICE_TYPE);
ovrEgl_CreateContext( &appState.Egl, NULL );
ovrEgl_CreateContext( &appState.Egl, NULL );
EglInitExtensions();
@@ -1645,7 +1647,7 @@ void * AppThreadFunction( void * parm )
#endif
//Set 90hz mode for Quest 2
if (vrapi_GetSystemPropertyInt(&java, VRAPI_SYS_PROP_DEVICE_TYPE) == VRAPI_DEVICE_TYPE_OCULUSQUEST2) {
if (hmdType == VRAPI_DEVICE_TYPE_OCULUSQUEST2) {
vrapi_SetDisplayRefreshRate(appState.Ovr, 90);
}
@@ -26,6 +26,8 @@ float positional_movementSideways;
float positional_movementForward;
float snapTurn;
int hmdType;
void sendButtonAction(const char* action, long buttonDown);
void sendButtonActionSimple(const char* action);
@@ -309,7 +309,8 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
{
//This section corrects for the fact that the controller actually controls direction of movement, but we want to move relative to the direction the
//player is facing for positional tracking
float multiplier = vr_positional_factor->value / (cl_forwardspeed->value *
float factor = (hmdType == VRAPI_DEVICE_TYPE_OCULUSQUEST2) ? ( vr_positional_factor->value * 1.25F ) : vr_positional_factor->value;
float multiplier = factor / (cl_forwardspeed->value *
((pOffTrackedRemoteNew->Buttons & ovrButton_Trigger) ? cl_movespeedkey->value : 1.0f));
//If player is ducked then multiply by 3 otherwise positional tracking feels very wrong
@@ -139,7 +139,7 @@ Q_buildcommit will identify this build as release or "notset"
*/
const char *Q_buildcommit( void )
{
return "Lambda1VR-v1.4.8";
return "Lambda1VR-v1.4.9";
}
/*