mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-25 14:14:08 +02:00
Improve communication with hand controller script
This commit is contained in:
parent
cadd4685ee
commit
a24a0265f9
1 changed files with 10 additions and 2 deletions
|
@ -22,14 +22,19 @@
|
|||
VR_EDIT_SETTING = "io.highfidelity.isVREditing"; // Note: This constant is duplicated in utils.js.
|
||||
|
||||
|
||||
function updateHandControllerGrab() {
|
||||
// Communicate status to handControllerGrab.js.
|
||||
Settings.setValue(VR_EDIT_SETTING, isAppActive);
|
||||
}
|
||||
|
||||
function onButtonClicked() {
|
||||
isAppActive = !isAppActive;
|
||||
Settings.setValue(VR_EDIT_SETTING, isAppActive);
|
||||
updateHandControllerGrab();
|
||||
button.editProperties({ isActive: isAppActive });
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
Settings.setValue(VR_EDIT_SETTING, isAppActive);
|
||||
updateHandControllerGrab();
|
||||
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
if (!tablet) {
|
||||
|
@ -49,6 +54,9 @@
|
|||
}
|
||||
|
||||
function tearDown() {
|
||||
isAppActive = false;
|
||||
updateHandControllerGrab();
|
||||
|
||||
if (!tablet) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue