mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 15:24:07 +02:00
Don't calibrate avatar for Leap Motion if mounted on HMD
This commit is contained in:
parent
6375e42d88
commit
c02cd66dcb
1 changed files with 15 additions and 3 deletions
|
@ -13,7 +13,8 @@
|
||||||
|
|
||||||
var leapHands = (function () {
|
var leapHands = (function () {
|
||||||
|
|
||||||
var hands,
|
var isOnHMD,
|
||||||
|
hands,
|
||||||
wrists,
|
wrists,
|
||||||
NUM_HANDS = 2, // 0 = left; 1 = right
|
NUM_HANDS = 2, // 0 = left; 1 = right
|
||||||
fingers,
|
fingers,
|
||||||
|
@ -188,8 +189,6 @@ var leapHands = (function () {
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
|
|
||||||
calibrationStatus = UNCALIBRATED;
|
|
||||||
|
|
||||||
// TODO: Leap Motion controller joint naming doesn't match up with skeleton joint naming; numbers are out by 1.
|
// TODO: Leap Motion controller joint naming doesn't match up with skeleton joint naming; numbers are out by 1.
|
||||||
|
|
||||||
hands = [
|
hands = [
|
||||||
|
@ -265,6 +264,19 @@ var leapHands = (function () {
|
||||||
{ jointName: "RightHandPinky3", controller: Controller.createInputController("Spatial", "joint_R_pinky4") }
|
{ jointName: "RightHandPinky3", controller: Controller.createInputController("Spatial", "joint_R_pinky4") }
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
isOnHMD = Menu.isOptionChecked("Leap Motion on HMD");
|
||||||
|
if (isOnHMD) {
|
||||||
|
print("Leap Motion is on HMD");
|
||||||
|
|
||||||
|
hands[0].zeroPosition = { x: 0.0, y: 0.0, z: 0.0 };
|
||||||
|
hands[1].zeroPosition = { x: 0.0, y: 0.0, z: 0.0 };
|
||||||
|
|
||||||
|
calibrationStatus = CALIBRATED;
|
||||||
|
} else {
|
||||||
|
print("Leap Motion is on desk");
|
||||||
|
calibrationStatus = UNCALIBRATED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveHands() {
|
function moveHands() {
|
||||||
|
|
Loading…
Reference in a new issue