fix edit log spam with -1 hand

This commit is contained in:
David Back 2018-08-03 11:08:56 -07:00
parent 2013f1bd33
commit 0565e0400c

View file

@ -38,8 +38,11 @@ getGrabPointSphereOffset = function(handController, ignoreSensorToWorldScale) {
getControllerWorldLocation = function (handController, doOffset) {
var orientation;
var position;
var valid = false;
if (handController >= 0) {
var pose = Controller.getPoseValue(handController);
var valid = pose.valid;
valid = pose.valid;
var controllerJointIndex;
if (pose.valid) {
if (handController === Controller.Standard.RightHand) {
@ -63,6 +66,7 @@ getControllerWorldLocation = function (handController, doOffset) {
orientation = Quat.multiply(Camera.orientation, Quat.angleAxis(-90, { x: 1, y: 0, z: 0 }));
valid = true;
}
}
return {position: position,
translation: position,