mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 23:53:54 +02:00
Add default script to enter first person for HMD
This commit is contained in:
parent
d45694836f
commit
0c56af7ae8
2 changed files with 18 additions and 0 deletions
|
@ -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");
|
||||
|
|
17
scripts/system/firstPersonHMD.js
Normal file
17
scripts/system/firstPersonHMD.js
Normal 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");
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue