mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 04:24:47 +02:00
Work-around for right hand roll on Windows is no longer needed
This commit is contained in:
parent
8084c5c77d
commit
373d2f0532
1 changed files with 0 additions and 10 deletions
|
@ -31,7 +31,6 @@ var leapHands = (function () {
|
||||||
CALIBRATED = 2,
|
CALIBRATED = 2,
|
||||||
CALIBRATION_TIME = 1000, // milliseconds
|
CALIBRATION_TIME = 1000, // milliseconds
|
||||||
PI = 3.141593,
|
PI = 3.141593,
|
||||||
isWindows,
|
|
||||||
avatarScale,
|
avatarScale,
|
||||||
avatarFaceModelURL,
|
avatarFaceModelURL,
|
||||||
avatarSkeletonModelURL,
|
avatarSkeletonModelURL,
|
||||||
|
@ -132,9 +131,6 @@ var leapHands = (function () {
|
||||||
|
|
||||||
if (hands[0].controller.isActive() && hands[1].controller.isActive()) {
|
if (hands[0].controller.isActive() && hands[1].controller.isActive()) {
|
||||||
leapHandHeight = (hands[0].controller.getAbsTranslation().y + hands[1].controller.getAbsTranslation().y) / 2.0;
|
leapHandHeight = (hands[0].controller.getAbsTranslation().y + hands[1].controller.getAbsTranslation().y) / 2.0;
|
||||||
|
|
||||||
// TODO: Temporary detection of Windows to work around Leap Controller problem.
|
|
||||||
isWindows = (hands[1].controller.getAbsRotation().z > (0.25 * PI));
|
|
||||||
} else {
|
} else {
|
||||||
calibrationStatus = UNCALIBRATED;
|
calibrationStatus = UNCALIBRATED;
|
||||||
return;
|
return;
|
||||||
|
@ -398,12 +394,6 @@ var leapHands = (function () {
|
||||||
handPitch = 2.0 * -wristAbsRotation.x;
|
handPitch = 2.0 * -wristAbsRotation.x;
|
||||||
handYaw = 2.0 * wristAbsRotation.y;
|
handYaw = 2.0 * wristAbsRotation.y;
|
||||||
|
|
||||||
// TODO: Leap Motion controller's right-hand roll calculation only works if physical hand is upside down.
|
|
||||||
// Approximate fix is to add a fudge factor.
|
|
||||||
if (h === 1 && isWindows) {
|
|
||||||
handRoll = handRoll + 0.6 * PI;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hand position and orientation ...
|
// Hand position and orientation ...
|
||||||
if (h === 0) {
|
if (h === 0) {
|
||||||
handRotation = Quat.multiply(Quat.angleAxis(-90.0, { x: 0, y: 1, z: 0 }),
|
handRotation = Quat.multiply(Quat.angleAxis(-90.0, { x: 0, y: 1, z: 0 }),
|
||||||
|
|
Loading…
Reference in a new issue