mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-10-07 19:03:29 +00:00
OpenXR - Let users set the movement length
This commit is contained in:
parent
0101c464a5
commit
3c87e71177
@ -208,7 +208,7 @@ void UpdateVRInput(bool(*NativeKey)(const KeyInput &key), bool(*NativeTouch)(con
|
||||
if (g_Config.bEnableMotions) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
bool activate;
|
||||
float limit = 0.5f; //length of needed movement in meters
|
||||
float limit = g_Config.fMotionLength; //length of needed movement in meters
|
||||
XrVector3f axis = {0, 1, 0};
|
||||
float center = ToRadians((float)VR_GetConfig(VR_CONFIG_MENU_YAW));
|
||||
XrQuaternionf orientation = XrQuaternionf_CreateFromVectorAngle(axis, center);
|
||||
|
@ -1214,6 +1214,7 @@ static ConfigSetting vrSettings[] = {
|
||||
ConfigSetting("VRCameraSide", &g_Config.fCameraSide, 0.0f),
|
||||
ConfigSetting("VRCanvasDistance", &g_Config.fCanvasDistance, 6.0f),
|
||||
ConfigSetting("VRFieldOfView", &g_Config.fFieldOfViewPercentage, 100.0f),
|
||||
ConfigSetting("VRMotionLength", &g_Config.fMotionLength, 0.5f),
|
||||
|
||||
ConfigSetting(false),
|
||||
};
|
||||
|
@ -469,6 +469,7 @@ public:
|
||||
float fCameraSide;
|
||||
float fCanvasDistance;
|
||||
float fFieldOfViewPercentage;
|
||||
float fMotionLength;
|
||||
|
||||
// Debugger
|
||||
int iDisasmWindowX;
|
||||
|
@ -1163,15 +1163,18 @@ void GameSettingsScreen::CreateViews() {
|
||||
vr6DoF->SetEnabledPtr(&g_Config.bEnableVR);
|
||||
CheckBox *vrStereo = vrSettings->Add(new CheckBox(&g_Config.bEnableStereo, vr->T("Stereoscopic vision (Experimental)")));
|
||||
vrStereo->SetEnabledPtr(&g_Config.bEnableVR);
|
||||
CheckBox *vrMotions = vrSettings->Add(new CheckBox(&g_Config.bEnableMotions, vr->T("Map controller movements to keys")));
|
||||
vrMotions->SetEnabledPtr(&g_Config.bEnableVR);
|
||||
|
||||
vrSettings->Add(new ItemHeader(vr->T("VR camera")));
|
||||
vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fCameraDistance, -10.0f, 10.0f, vr->T("Camera distance adjust", "Camera distance adjust"), 1.0f, screenManager(), ""));
|
||||
vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fCameraHeight, -10.0f, 10.0f, vr->T("Camera height adjust", "Camera height adjust"), 1.0f, screenManager(), ""));
|
||||
vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fCameraSide, -10.0f, 10.0f, vr->T("Camera side adjust", "Camera side adjust"), 1.0f, screenManager(), ""));
|
||||
vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fCanvasDistance, 1.0f, 10.0f, vr->T("Distance to 2D menus and scenes", "Distance to 2D menus and scenes"), 1.0f, screenManager(), ""));
|
||||
vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fFieldOfViewPercentage, 100.0f, 200.0f, vr->T("Field of view scale", "Headset's field of view scale"), 10.0f, screenManager(), vr->T("% of native FoV")));
|
||||
vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fFieldOfViewPercentage, 100.0f, 200.0f, vr->T("Field of view scale", "Field of view scale"), 10.0f, screenManager(), vr->T("% of native FoV")));
|
||||
|
||||
vrSettings->Add(new ItemHeader(vr->T("VR controllers")));
|
||||
vrSettings->Add(new CheckBox(&g_Config.bEnableMotions, vr->T("Map controller movements to keys")));
|
||||
PopupSliderChoiceFloat *vrMotions = vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fMotionLength, 0.3f, 1.0f, vr->T("Motion needed to generate action", "Motion needed to generate action"), 0.1f, screenManager(), vr->T("m")));
|
||||
vrMotions->SetEnabledPtr(&g_Config.bEnableMotions);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user