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 tutorial/tutorialStartZone.js (1 of 15 files). Show all

Unified · Split

tutorial/tutorialStartZone.js+11−10
@@ -8,20 +8,21 @@ · 7 unmodified lines
88 },
99 enterEntity: function() {
1010 // send message to outer zone
11− print("ENTERED THE TUTORIAL START AREA");
12− var parentID = Entities.getEntityProperties(this.entityID, 'parentID').parentID;
13− print("HERE", parentID);
14− if (parentID) {
15− print("HERE2");
16− Entities.callEntityMethod(parentID, 'start');
17− print("HERE4");
11+ print("Entered the tutorial start area");
12+ if (HMD.isHMDAvailable() && HMD.isHandControllerAvailable()) {
13+ var parentID = Entities.getEntityProperties(this.entityID, 'parentID').parentID;
14+ if (parentID) {
15+ Entities.callEntityMethod(parentID, 'start');
16+ } else {
17+ print("ERROR: No parent id found on tutorial start zone");
18+ }
1819 } else {
19− print("HERE3");
20− print("ERROR: No parent id found on tutorial start zone");
20+ Window.alert("To proceed with this tutorial, please connect your VR headset and hand controllers.");
21+ location = "/";
2122 }
2223 },
2324 leaveEntity: function() {
24− print("EXITED THE TUTORIAL START AREA");
25+ print("Exited the tutorial start area");
2526 }
2627 };
2728

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t