mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Merge pull request #625 from PhilipRosedale/master
Tuned smooth gyro look to feel better
This commit is contained in:
commit
c2ad02def2
3 changed files with 10 additions and 7 deletions
|
@ -1487,7 +1487,8 @@ void Application::initMenu() {
|
|||
(_testPing = optionsMenu->addAction("Test Ping"))->setCheckable(true);
|
||||
_testPing->setChecked(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");
|
||||
(_renderVoxels = renderMenu->addAction("Voxels"))->setCheckable(true);
|
||||
|
@ -2805,6 +2806,7 @@ void Application::eyedropperVoxelUnderCursor() {
|
|||
}
|
||||
|
||||
void Application::goHome() {
|
||||
printLog("Going Home!\n");
|
||||
_myAvatar.setPosition(START_LOCATION);
|
||||
}
|
||||
|
||||
|
|
|
@ -150,6 +150,8 @@ private slots:
|
|||
void copyVoxels();
|
||||
void pasteVoxels();
|
||||
void runTests();
|
||||
void goHome();
|
||||
|
||||
private:
|
||||
|
||||
static void controlledBroadcastToNodes(unsigned char* broadcastData, size_t dataBytes,
|
||||
|
@ -184,7 +186,6 @@ private:
|
|||
void maybeEditVoxelUnderCursor();
|
||||
void deleteVoxelUnderCursor();
|
||||
void eyedropperVoxelUnderCursor();
|
||||
void goHome();
|
||||
void resetSensors();
|
||||
|
||||
void setMenuShortcutsEnabled(bool enabled);
|
||||
|
|
|
@ -223,11 +223,11 @@ void Head::simulate(float deltaTime, bool isMine) {
|
|||
if (isMine && _cameraFollowsHead) {
|
||||
// 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.
|
||||
const float CAMERA_FOLLOW_HEAD_RATE_START = 0.05f;
|
||||
const float CAMERA_FOLLOW_HEAD_RATE_MAX = 0.25f;
|
||||
const float CAMERA_FOLLOW_HEAD_RATE_RAMP_RATE = 1.5f;
|
||||
const float CAMERA_STOP_TOLERANCE_DEGREES = 0.25f;
|
||||
const float CAMERA_START_TOLERANCE_DEGREES = 15.0f;
|
||||
const float CAMERA_FOLLOW_HEAD_RATE_START = 0.01f;
|
||||
const float CAMERA_FOLLOW_HEAD_RATE_MAX = 0.5f;
|
||||
const float CAMERA_FOLLOW_HEAD_RATE_RAMP_RATE = 1.05f;
|
||||
const float CAMERA_STOP_TOLERANCE_DEGREES = 0.1f;
|
||||
const float CAMERA_START_TOLERANCE_DEGREES = 2.0f;
|
||||
float cameraHeadAngleDifference = glm::length(glm::vec2(_pitch - _cameraPitch, _yaw - _cameraYaw));
|
||||
if (_isCameraMoving) {
|
||||
_cameraFollowHeadRate = glm::clamp(_cameraFollowHeadRate * CAMERA_FOLLOW_HEAD_RATE_RAMP_RATE,
|
||||
|
|
Loading…
Reference in a new issue