Add default script to enter first person for HMD

This commit is contained in:
Zander Otavka 2016-06-24 11:57:50 -07:00
parent d45694836f
commit 0c56af7ae8
2 changed files with 18 additions and 0 deletions

View file

@ -21,3 +21,4 @@ Script.load("system/controllers/handControllerPointer.js");
Script.load("system/controllers/squeezeHands.js");
Script.load("system/controllers/grab.js");
Script.load("system/dialTone.js");
Script.load("system/firstPersonHMD.js");

View file

@ -0,0 +1,17 @@
//
// firstPersonHMD.js
// system
//
// Created by Zander Otavka on 6/24/16
// Copyright 2016 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// Automatically enter first person mode when entering HMD mode
HMD.displayModeChanged.connect(function(isHMDMode) {
if (isHMDMode) {
Camera.setModeString("first person");
}
});