Merge pull request #13750 from dback2/editLogSpamFix

Fix edit log spam with -1 hand
This commit is contained in:
David Back 2018-08-07 13:51:39 -07:00 committed by GitHub
commit 3c5c5d8552
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,