mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 22:27:25 +02:00
fix edit log spam with -1 hand
This commit is contained in:
parent
2013f1bd33
commit
0565e0400c
1 changed files with 26 additions and 22 deletions
|
@ -38,8 +38,11 @@ getGrabPointSphereOffset = function(handController, ignoreSensorToWorldScale) {
|
||||||
getControllerWorldLocation = function (handController, doOffset) {
|
getControllerWorldLocation = function (handController, doOffset) {
|
||||||
var orientation;
|
var orientation;
|
||||||
var position;
|
var position;
|
||||||
|
var valid = false;
|
||||||
|
|
||||||
|
if (handController >= 0) {
|
||||||
var pose = Controller.getPoseValue(handController);
|
var pose = Controller.getPoseValue(handController);
|
||||||
var valid = pose.valid;
|
valid = pose.valid;
|
||||||
var controllerJointIndex;
|
var controllerJointIndex;
|
||||||
if (pose.valid) {
|
if (pose.valid) {
|
||||||
if (handController === Controller.Standard.RightHand) {
|
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 }));
|
orientation = Quat.multiply(Camera.orientation, Quat.angleAxis(-90, { x: 1, y: 0, z: 0 }));
|
||||||
valid = true;
|
valid = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {position: position,
|
return {position: position,
|
||||||
translation: position,
|
translation: position,
|
||||||
|
|
Loading…
Reference in a new issue