Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all
Unified · Split
| @@ -1290,9 +1290,9 @@ void Application::editPreferences() { · 1289 unmodified lines | |||
| 1290 | horizontalFieldOfView->setValue(_horizontalFieldOfView); | 1290 | horizontalFieldOfView->setValue(_horizontalFieldOfView); |
| 1291 | form->addRow("Horizontal field of view (degrees):", horizontalFieldOfView); | 1291 | form->addRow("Horizontal field of view (degrees):", horizontalFieldOfView); |
| 1292 | 1292 | ||
| 1293 | QDoubleSpinBox* headCameraPitchYawScale = new QDoubleSpinBox(); | 1293 | QDoubleSpinBox* gyroCameraSensitivity = new QDoubleSpinBox(); |
| 1294 | headCameraPitchYawScale->setValue(_headCameraPitchYawScale); | 1294 | gyroCameraSensitivity->setValue(_gyroCameraSensitivity); |
| 1295 | form->addRow("Head Camera Pitch/Yaw Scale:", headCameraPitchYawScale); | 1295 | form->addRow("Gyro Camera Sensitivity (0 - 1):", gyroCameraSensitivity); |
| 1296 | 1296 | ||
| 1297 | QDoubleSpinBox* leanScale = new QDoubleSpinBox(); | 1297 | QDoubleSpinBox* leanScale = new QDoubleSpinBox(); |
| 1298 | leanScale->setValue(_myAvatar.getLeanScale()); | 1298 | leanScale->setValue(_myAvatar.getLeanScale()); |
| @@ -1342,7 +1342,7 @@ void Application::editPreferences() { · 43 unmodified lines | |||
| 1342 | _myAvatar.getVoxels()->setVoxelURL(url); | 1342 | _myAvatar.getVoxels()->setVoxelURL(url); |
| 1343 | sendAvatarVoxelURLMessage(url); | 1343 | sendAvatarVoxelURLMessage(url); |
| 1344 | 1344 | ||
| 1345 | _headCameraPitchYawScale = headCameraPitchYawScale->value(); | 1345 | _gyroCameraSensitivity = gyroCameraSensitivity->value(); |
| 1346 | _myAvatar.setLeanScale(leanScale->value()); | 1346 | _myAvatar.setLeanScale(leanScale->value()); |
| 1347 | _audioJitterBufferSamples = audioJitterBufferSamples->value(); | 1347 | _audioJitterBufferSamples = audioJitterBufferSamples->value(); |
| 1348 | if (!shouldDynamicallySetJitterBuffer()) { | 1348 | if (!shouldDynamicallySetJitterBuffer()) { |
| @@ -2500,7 +2500,7 @@ void Application::update(float deltaTime) { · 1151 unmodified lines | |||
| 2500 | if (!avatar->isInitialized()) { | 2500 | if (!avatar->isInitialized()) { |
| 2501 | avatar->init(); | 2501 | avatar->init(); |
| 2502 | } | 2502 | } |
| 2503 | avatar->simulate(deltaTime, NULL); | 2503 | avatar->simulate(deltaTime, NULL, 0.f); |
| 2504 | avatar->setMouseRay(mouseRayOrigin, mouseRayDirection); | 2504 | avatar->setMouseRay(mouseRayOrigin, mouseRayDirection); |
| 2505 | } | 2505 | } |
| 2506 | node->unlock(); | 2506 | node->unlock(); |
| @@ -2515,9 +2515,9 @@ void Application::update(float deltaTime) { · 8 unmodified lines | |||
| 2515 | } | 2515 | } |
| 2516 | 2516 | ||
| 2517 | if (_transmitterDrives->isChecked() && _myTransmitter.isConnected()) { | 2517 | if (_transmitterDrives->isChecked() && _myTransmitter.isConnected()) { |
| 2518 | _myAvatar.simulate(deltaTime, &_myTransmitter); | 2518 | _myAvatar.simulate(deltaTime, &_myTransmitter, _gyroCameraSensitivity); |
| 2519 | } else { | 2519 | } else { |
| 2520 | _myAvatar.simulate(deltaTime, NULL); | 2520 | _myAvatar.simulate(deltaTime, NULL, _gyroCameraSensitivity); |
| 2521 | } | 2521 | } |
| 2522 | 2522 | ||
| 2523 | if (!OculusManager::isConnected()) { | 2523 | if (!OculusManager::isConnected()) { |
| @@ -2584,9 +2584,6 @@ void Application::updateAvatar(float deltaTime) { · 60 unmodified lines | |||
| 2584 | 2584 | ||
| 2585 | // Update my avatar's state from gyros and/or webcam | 2585 | // Update my avatar's state from gyros and/or webcam |
| 2586 | _myAvatar.updateFromGyrosAndOrWebcam(_gyroLook->isChecked(), | 2586 | _myAvatar.updateFromGyrosAndOrWebcam(_gyroLook->isChecked(), |
| 2587 | glm::vec3(_headCameraPitchYawScale, | ||
| 2588 | _headCameraPitchYawScale, | ||
| 2589 | _headCameraPitchYawScale), | ||
| 2590 | _pitchFromTouch); | 2587 | _pitchFromTouch); |
| 2591 | 2588 | ||
| 2592 | if (_serialHeadSensor.isActive()) { | 2589 | if (_serialHeadSensor.isActive()) { |
| @@ -3951,11 +3948,11 @@ void Application::saveAction(QSettings* set, QAction* action) { · 1358 unmodified lines | |||
| 3951 | } | 3948 | } |
| 3952 | 3949 | ||
| 3953 | void Application::loadSettings(QSettings* settings) { | 3950 | void Application::loadSettings(QSettings* settings) { |
| 3954 | if (!settings) { | 3951 | if (!settings) { |
| 3955 | settings = getSettings(); | 3952 | settings = getSettings(); |
| 3956 | } | 3953 | } |
| 3957 | 3954 | ||
| 3958 | _headCameraPitchYawScale = loadSetting(settings, "headCameraPitchYawScale", 0.0f); | 3955 | _gyroCameraSensitivity = loadSetting(settings, "gyroCameraSensitivity", 0.5f); |
| 3959 | _audioJitterBufferSamples = loadSetting(settings, "audioJitterBufferSamples", 0); | 3956 | _audioJitterBufferSamples = loadSetting(settings, "audioJitterBufferSamples", 0); |
| 3960 | _horizontalFieldOfView = loadSetting(settings, "horizontalFieldOfView", HORIZONTAL_FIELD_OF_VIEW_DEGREES); | 3957 | _horizontalFieldOfView = loadSetting(settings, "horizontalFieldOfView", HORIZONTAL_FIELD_OF_VIEW_DEGREES); |
| 3961 | 3958 | ||
| @@ -3979,7 +3976,7 @@ void Application::saveSettings(QSettings* settings) { · 17 unmodified lines | |||
| 3979 | settings = getSettings(); | 3976 | settings = getSettings(); |
| 3980 | } | 3977 | } |
| 3981 | 3978 | ||
| 3982 | settings->setValue("headCameraPitchYawScale", _headCameraPitchYawScale); | 3979 | settings->setValue("gyroCameraSensitivity", _gyroCameraSensitivity); |
| 3983 | settings->setValue("audioJitterBufferSamples", _audioJitterBufferSamples); | 3980 | settings->setValue("audioJitterBufferSamples", _audioJitterBufferSamples); |
| 3984 | settings->setValue("horizontalFieldOfView", _horizontalFieldOfView); | 3981 | settings->setValue("horizontalFieldOfView", _horizontalFieldOfView); |
| 3985 | settings->beginGroup("View Frustum Offset Camera"); | 3982 | settings->beginGroup("View Frustum Offset Camera"); |