diff --git a/src/components/hand-tracking-controls.js b/src/components/hand-tracking-controls.js index d6658949915..1755b68899f 100644 --- a/src/components/hand-tracking-controls.js +++ b/src/components/hand-tracking-controls.js @@ -43,7 +43,7 @@ var THUMB_TIP_INDEX = 4; var INDEX_TIP_INDEX = 9; var PINCH_START_DISTANCE = 0.015; -var PINCH_END_PERCENTAGE = 0.1; +var PINCH_END_DISTANCE = 0.02; /** * Controls for hand tracking @@ -282,12 +282,11 @@ module.exports.Component = registerComponent('hand-tracking-controls', { if (distance < PINCH_START_DISTANCE && this.isPinched === false) { this.isPinched = true; - this.pinchDistance = distance; pinchEventDetail.position.copy(indexTipPosition).add(thumbTipPosition).multiplyScalar(0.5); this.el.emit('pinchstarted', pinchEventDetail); } - if (distance > (this.pinchDistance + this.pinchDistance * PINCH_END_PERCENTAGE) && this.isPinched === true) { + if (distance > PINCH_END_DISTANCE && this.isPinched === true) { this.isPinched = false; pinchEventDetail.position.copy(indexTipPosition).add(thumbTipPosition).multiplyScalar(0.5); this.el.emit('pinchended', pinchEventDetail);