fixed bug

This commit is contained in:
Dante Ruiz 2017-01-07 00:22:55 +00:00
parent 4ef5c76a65
commit 07079ad78d
2 changed files with 3 additions and 1 deletions

View file

@ -469,6 +469,7 @@ clickMapping.from(Controller.Standard.LeftSecondaryThumb).peek().to(function (cl
clickMapping.from(Controller.Standard.Start).peek().to(function (clicked) {
if (clicked) {
activeHudPoint2dGamePad();
Messages.sendLocalMessage("toggleHand", -1);
}
wantsMenu = clicked;
@ -480,6 +481,7 @@ clickMapping.from(Controller.Hardware.Keyboard.RightMouseClicked).peek().to(func
// We don't want the system code to always do this for us, because, e.g., we do not want to get a mouseMove
// after the Left/RightSecondaryThumb gives us a context menu. Only from the mouse.
Script.setTimeout(function () {
Messages.sendLocalMessage("toggleHand", -1);
Reticle.setPosition(Reticle.position);
}, 0);
});

View file

@ -22,7 +22,7 @@ var TABLET_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/Tablet-Model-v1-
// * position - position in front of the user
// * rotation - rotation of entity so it faces the user.
function calcSpawnInfo(hand) {
if (HMD.active && hand) {
if (HMD.active && hand > 0) {
var handController = getControllerWorldLocation(hand, false);
var front = Quat.getFront(handController.orientation);
var up = Quat.getUp(handController.orientation);