mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 03:03:35 +02:00
Merge branch 'master' of git://github.com/worklist/hifi into 19373
This commit is contained in:
commit
013aabc65c
3 changed files with 10 additions and 7 deletions
|
@ -1489,7 +1489,8 @@ void Application::initMenu() {
|
||||||
(_testPing = optionsMenu->addAction("Test Ping"))->setCheckable(true);
|
(_testPing = optionsMenu->addAction("Test Ping"))->setCheckable(true);
|
||||||
_testPing->setChecked(true);
|
_testPing->setChecked(true);
|
||||||
(_fullScreenMode = optionsMenu->addAction("Fullscreen", this, SLOT(setFullscreen(bool)), Qt::Key_F))->setCheckable(true);
|
(_fullScreenMode = optionsMenu->addAction("Fullscreen", this, SLOT(setFullscreen(bool)), Qt::Key_F))->setCheckable(true);
|
||||||
optionsMenu->addAction("Webcam", &_webcam, SLOT(setEnabled(bool)))->setCheckable(true);
|
optionsMenu->addAction("Webcam", &_webcam, SLOT(setEnabled(bool)))->setCheckable(true);
|
||||||
|
optionsMenu->addAction("Go Home", this, SLOT(goHome()));
|
||||||
|
|
||||||
QMenu* renderMenu = menuBar->addMenu("Render");
|
QMenu* renderMenu = menuBar->addMenu("Render");
|
||||||
(_renderVoxels = renderMenu->addAction("Voxels"))->setCheckable(true);
|
(_renderVoxels = renderMenu->addAction("Voxels"))->setCheckable(true);
|
||||||
|
@ -2807,6 +2808,7 @@ void Application::eyedropperVoxelUnderCursor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::goHome() {
|
void Application::goHome() {
|
||||||
|
printLog("Going Home!\n");
|
||||||
_myAvatar.setPosition(START_LOCATION);
|
_myAvatar.setPosition(START_LOCATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,8 @@ private slots:
|
||||||
void copyVoxels();
|
void copyVoxels();
|
||||||
void pasteVoxels();
|
void pasteVoxels();
|
||||||
void runTests();
|
void runTests();
|
||||||
|
void goHome();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static void controlledBroadcastToNodes(unsigned char* broadcastData, size_t dataBytes,
|
static void controlledBroadcastToNodes(unsigned char* broadcastData, size_t dataBytes,
|
||||||
|
@ -184,7 +186,6 @@ private:
|
||||||
void maybeEditVoxelUnderCursor();
|
void maybeEditVoxelUnderCursor();
|
||||||
void deleteVoxelUnderCursor();
|
void deleteVoxelUnderCursor();
|
||||||
void eyedropperVoxelUnderCursor();
|
void eyedropperVoxelUnderCursor();
|
||||||
void goHome();
|
|
||||||
void resetSensors();
|
void resetSensors();
|
||||||
|
|
||||||
void setMenuShortcutsEnabled(bool enabled);
|
void setMenuShortcutsEnabled(bool enabled);
|
||||||
|
|
|
@ -223,11 +223,11 @@ void Head::simulate(float deltaTime, bool isMine) {
|
||||||
if (isMine && _cameraFollowsHead) {
|
if (isMine && _cameraFollowsHead) {
|
||||||
// If we are using gyros and using gyroLook, have the camera follow head but with a null region
|
// If we are using gyros and using gyroLook, have the camera follow head but with a null region
|
||||||
// to create stable rendering view with small head movements.
|
// to create stable rendering view with small head movements.
|
||||||
const float CAMERA_FOLLOW_HEAD_RATE_START = 0.05f;
|
const float CAMERA_FOLLOW_HEAD_RATE_START = 0.01f;
|
||||||
const float CAMERA_FOLLOW_HEAD_RATE_MAX = 0.25f;
|
const float CAMERA_FOLLOW_HEAD_RATE_MAX = 0.5f;
|
||||||
const float CAMERA_FOLLOW_HEAD_RATE_RAMP_RATE = 1.5f;
|
const float CAMERA_FOLLOW_HEAD_RATE_RAMP_RATE = 1.05f;
|
||||||
const float CAMERA_STOP_TOLERANCE_DEGREES = 0.25f;
|
const float CAMERA_STOP_TOLERANCE_DEGREES = 0.1f;
|
||||||
const float CAMERA_START_TOLERANCE_DEGREES = 15.0f;
|
const float CAMERA_START_TOLERANCE_DEGREES = 2.0f;
|
||||||
float cameraHeadAngleDifference = glm::length(glm::vec2(_pitch - _cameraPitch, _yaw - _cameraYaw));
|
float cameraHeadAngleDifference = glm::length(glm::vec2(_pitch - _cameraPitch, _yaw - _cameraYaw));
|
||||||
if (_isCameraMoving) {
|
if (_isCameraMoving) {
|
||||||
_cameraFollowHeadRate = glm::clamp(_cameraFollowHeadRate * CAMERA_FOLLOW_HEAD_RATE_RAMP_RATE,
|
_cameraFollowHeadRate = glm::clamp(_cameraFollowHeadRate * CAMERA_FOLLOW_HEAD_RATE_RAMP_RATE,
|
||||||
|
|
Loading…
Reference in a new issue