History

Update tutorial to work with HMD + Hand Controllers only

Ryan Huffman committed 10 years ago

Commit 216cf2b1 parent 66a33d015 files · +116 −33Browse files

Showing the changes to interface/src/Application.cpp (1 of 15 files). Show all

Unified · Split

interface/src/Application.cpp+8−10
@@ -87,6 +87,7 @@ · 86 unmodified lines
87#include <PhysicsEngine.h>87#include <PhysicsEngine.h>
88#include <PhysicsHelpers.h>88#include <PhysicsHelpers.h>
89#include <plugins/PluginManager.h>89#include <plugins/PluginManager.h>
90#include <plugins/PluginUtils.h>
90#include <plugins/CodecPlugin.h>91#include <plugins/CodecPlugin.h>
91#include <RecordingScriptingInterface.h>92#include <RecordingScriptingInterface.h>
92#include <RenderableWebEntityItem.h>93#include <RenderableWebEntityItem.h>
@@ -1276,17 +1277,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 1183 unmodified lines
1276 bool hasTutorialContent = contentVersion >= 1;1277 bool hasTutorialContent = contentVersion >= 1;
1277 1278
1278 Setting::Handle<bool> firstRun { Settings::firstRun, true };1279 Setting::Handle<bool> firstRun { Settings::firstRun, true };
1279 bool hasVive = false;1280 bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable() && PluginUtils::isHandControllerAvailable();
1280 for (auto& displayPlugin : PluginManager::getInstance()->getDisplayPlugins()) {
1281 if (displayPlugin->getName() == "OpenVR (Vive)") {
1282 hasVive = true;
1283 break;
1284 }
1285 }
1286 Setting::Handle<bool> tutorialComplete { "tutorialComplete", false };1281 Setting::Handle<bool> tutorialComplete { "tutorialComplete", false };
1287 1282
1288 bool shouldGoToTutorial = hasVive && hasTutorialContent && !tutorialComplete.get();1283 bool shouldGoToTutorial = hasHMDAndHandControllers && hasTutorialContent && !tutorialComplete.get();
1289 qDebug() << "has vive: " << hasVive << ", current plugin: " << _displayPlugin->getName();1284
1285 qDebug() << "Has HMD + Hand Controllers: " << hasHMDAndHandControllers << ", current plugin: " << _displayPlugin->getName();
1290 qDebug() << "has tutorial content" << hasTutorialContent;1286 qDebug() << "has tutorial content" << hasTutorialContent;
1291 qDebug() << "tutorial complete" << tutorialComplete.get();1287 qDebug() << "tutorial complete" << tutorialComplete.get();
1292 qDebug() << "should go to tutorial " << shouldGoToTutorial;1288 qDebug() << "should go to tutorial " << shouldGoToTutorial;
@@ -1300,10 +1296,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 7 unmodified lines
1300 addressLookupString = arguments().value(urlIndex + 1);1296 addressLookupString = arguments().value(urlIndex + 1);
1301 }1297 }
1302 1298
1299 const QString TUTORIAL_PATH = "/tutorial_begin";
1300
1303 if (shouldGoToTutorial) {1301 if (shouldGoToTutorial) {
1304 DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([=]() {1302 DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([=]() {
1305 qDebug() << "Home sandbox appears to be running, going to Home.";1303 qDebug() << "Home sandbox appears to be running, going to Home.";
1306 DependencyManager::get<AddressManager>()->goToLocalSandbox("/tutorial_begin");1304 DependencyManager::get<AddressManager>()->goToLocalSandbox(TUTORIAL_PATH);
1307 }, [=]() {1305 }, [=]() {
1308 qDebug() << "Home sandbox does not appear to be running, going to Entry.";1306 qDebug() << "Home sandbox does not appear to be running, going to Entry.";
1309 if (firstRun.get()) {1307 if (firstRun.get()) {