Hi Everyone
I've been using the Leap for allowing visitors to make selection for Interactive Exhibits - I found that pushing to select would often 'miss' the target - so ended up using a hover instead.
Has anyone else had this issue and solved it - or maybe never had the issue in the first place - or know a better way to allow (untrained) Visitors to make selections.
Oh - I'm using Javascript from a kiosk browser page.
In case it helps, there is a brief video (complete with bug) at https://youtu.be/hqpg245L3wU
Best wishes
Andy
P.S. In case it helps - here's a copy of my code - probably needs some smoothing as well.
leap.loop(
{ hand: function (hand) {
let [x, y] = hand.screenPosition(hand.palmPosition);
let cursor = document.getElementById('cursor');
cursor.style.left = x + 'px';
cursor.style.top = y + 'px';
cursor.style.visibility = "hidden";
let elem = document.elementFromPoint(x, y);
cursor.style.visibility = "visible";
if (elem) {
if (!elem.classList.contains("focus")) {
// remove focus from all other elements - since the cursor isn't over them
self._removeFocus();
if (elem.classList.contains("quando_label")) {
elem.classList.add("focus");
elem.addEventListener("transitionend", self._handle_transition);
}
}
} else {
// remove focus from any elements - since the cursor isn't over them
self._removeFocus();
}
}
}).use('screenPosition', {
scale: 1, verticalOffset: screen.height
});