fix vive bug

This commit is contained in:
James B. Pollack 2016-07-01 00:48:29 -07:00
parent 104ee63a77
commit b2e407a8e1

View file

@ -125,19 +125,23 @@ function Teleporter() {
this.update = function() { this.update = function() {
//print('in teleporter update') //print('in teleporter update')
if (rightPad.buttonValue === 0 || leftPad.buttonValue === 0) {
print('JBP THUMB RELEASED SHOULD EXIT')
_this.exitTeleportMode();
return;
}
if (teleporter.teleportHand === 'left') { if (teleporter.teleportHand === 'left') {
teleporter.leftRay(); teleporter.leftRay();
if (leftPad.buttonValue === 0) {
_this.exitTeleportMode();
return;
}
if (leftTrigger.buttonValue === 0) { if (leftTrigger.buttonValue === 0) {
_this.teleport(); _this.teleport();
} }
} else { } else {
teleporter.rightRay(); teleporter.rightRay();
if (rightPad.buttonValue === 0) {
_this.exitTeleportMode();
return;
}
if (rightTrigger.buttonValue === 0) { if (rightTrigger.buttonValue === 0) {
_this.teleport(); _this.teleport();
} }