From 40df4973745655ff5d2af1c42d6705300cd89cc9 Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Tue, 2 Dec 2014 13:48:59 -0800 Subject: [PATCH 1/4] Hack for the Viking Palace scene before demo for good looking lightmaps --- interface/src/renderer/GeometryCache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/src/renderer/GeometryCache.cpp b/interface/src/renderer/GeometryCache.cpp index e2517613df..e523d7e608 100644 --- a/interface/src/renderer/GeometryCache.cpp +++ b/interface/src/renderer/GeometryCache.cpp @@ -841,6 +841,8 @@ void GeometryReader::run() { grabLightmaps = false; } else if (_url.path().toLower().endsWith("apt8_reboot.fbx")) { lightmapLevel = 4.0f; + } else if (_url.path().toLower().endsWith("palaceoforinthilian4.fbx")) { + lightmapLevel = 3.5f; } fbxgeo = readFBX(_reply->readAll(), _mapping, grabLightmaps, lightmapLevel); } From 2f11501e5b8f3fa5ff8049e8fbd8948f51fcb3c3 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Tue, 2 Dec 2014 14:28:46 -0800 Subject: [PATCH 2/4] Fix constant movement with hydra by adding null zone for thrust --- examples/hydraMove.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/hydraMove.js b/examples/hydraMove.js index 236cecab18..f469fbbe74 100644 --- a/examples/hydraMove.js +++ b/examples/hydraMove.js @@ -245,10 +245,15 @@ function handleGrabBehavior(deltaTime) { } // Update for joysticks and move button +var THRUST_DEAD_ZONE = 0.1; function flyWithHydra(deltaTime) { var thrustJoystickPosition = Controller.getJoystickPosition(THRUST_CONTROLLER); - if (thrustJoystickPosition.x != 0 || thrustJoystickPosition.y != 0) { + if (debug) { + print("thrust X: " + thrustJoystickPosition.x + " Y: " + thrustJoystickPosition.y); + } + + if (Math.abs(thrustJoystickPosition.x) > THRUST_DEAD_ZONE || Math.abs(thrustJoystickPosition.y) > THRUST_DEAD_ZONE) { if (thrustMultiplier < MAX_THRUST_MULTIPLIER) { thrustMultiplier *= 1 + (deltaTime * THRUST_INCREASE_RATE); } From 1ce201c04f9b93a17dc43ee6464dbbac809997a8 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Tue, 2 Dec 2014 14:33:19 -0800 Subject: [PATCH 3/4] add same for rotation --- examples/hydraMove.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/hydraMove.js b/examples/hydraMove.js index f469fbbe74..46715839c3 100644 --- a/examples/hydraMove.js +++ b/examples/hydraMove.js @@ -246,13 +246,10 @@ function handleGrabBehavior(deltaTime) { // Update for joysticks and move button var THRUST_DEAD_ZONE = 0.1; +var ROTATE_DEAD_ZONE = 0.1; function flyWithHydra(deltaTime) { var thrustJoystickPosition = Controller.getJoystickPosition(THRUST_CONTROLLER); - if (debug) { - print("thrust X: " + thrustJoystickPosition.x + " Y: " + thrustJoystickPosition.y); - } - if (Math.abs(thrustJoystickPosition.x) > THRUST_DEAD_ZONE || Math.abs(thrustJoystickPosition.y) > THRUST_DEAD_ZONE) { if (thrustMultiplier < MAX_THRUST_MULTIPLIER) { thrustMultiplier *= 1 + (deltaTime * THRUST_INCREASE_RATE); @@ -275,7 +272,7 @@ function flyWithHydra(deltaTime) { // View Controller var viewJoystickPosition = Controller.getJoystickPosition(VIEW_CONTROLLER); - if (viewJoystickPosition.x != 0 || viewJoystickPosition.y != 0) { + if (Math.abs(viewJoystickPosition.x) > ROTATE_DEAD_ZONE || Math.abs(viewJoystickPosition.y) > ROTATE_DEAD_ZONE) { // change the body yaw based on our x controller var orientation = MyAvatar.orientation; From 06b22cf6057c54aa326c88ac474780c766c85445 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Tue, 2 Dec 2014 14:50:25 -0800 Subject: [PATCH 4/4] ...and don't turn on/off UI from hydra --- interface/src/ui/ApplicationOverlay.cpp | 26 ------------------------- 1 file changed, 26 deletions(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 1307672ad1..305119a019 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -571,8 +571,6 @@ void ApplicationOverlay::renderControllerPointers() { static quint64 pressedTime[NUMBER_OF_MAGNIFIERS] = { 0ULL, 0ULL, 0ULL }; static bool isPressed[NUMBER_OF_MAGNIFIERS] = { false, false, false }; static bool stateWhenPressed[NUMBER_OF_MAGNIFIERS] = { false, false, false }; - static bool triggerPressed[NUMBER_OF_MAGNIFIERS] = { false, false, false }; - static bool bumperPressed[NUMBER_OF_MAGNIFIERS] = { false, false, false }; const HandData* handData = Application::getInstance()->getAvatar()->getHandData(); @@ -613,30 +611,6 @@ void ApplicationOverlay::renderControllerPointers() { } } - //Check for UI active toggle - if (palmData->getTrigger() == 1.0f) { - if (!triggerPressed[index]) { - if (bumperPressed[index]) { - Menu::getInstance()->setIsOptionChecked(MenuOption::UserInterface, - !Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)); - } - triggerPressed[index] = true; - } - } else { - triggerPressed[index] = false; - } - if ((controllerButtons & BUTTON_FWD)) { - if (!bumperPressed[index]) { - if (triggerPressed[index]) { - Menu::getInstance()->setIsOptionChecked(MenuOption::UserInterface, - !Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)); - } - bumperPressed[index] = true; - } - } else { - bumperPressed[index] = false; - } - //if we have the oculus, we should make the cursor smaller since it will be //magnified if (OculusManager::isConnected()) {