diff --git a/modules/touch/src/TouchInteraction.cpp b/modules/touch/src/TouchInteraction.cpp index 2aa2456c90..3b5a84734d 100644 --- a/modules/touch/src/TouchInteraction.cpp +++ b/modules/touch/src/TouchInteraction.cpp @@ -129,6 +129,7 @@ void TouchInteraction::updateStateFromInput(const std::vector& list, // evaluates if current frame is in directTouchMode (will if so be used next frame) if (_currentRadius > _nodeRadiusThreshold && _selected.size() == list.size()) { // needs better definition? + _vel.pan = glm::dvec2(0.0, 0.0); _directTouchMode = true; } else { diff --git a/modules/touch/src/TuioEar.cpp b/modules/touch/src/TuioEar.cpp index 7080859936..10f652441e 100644 --- a/modules/touch/src/TuioEar.cpp +++ b/modules/touch/src/TuioEar.cpp @@ -88,17 +88,14 @@ void TuioEar::updateTuioCursor(TuioCursor *tcur) { void TuioEar::removeTuioCursor(TuioCursor *tcur) { _mx.lock(); _removeList.push_back(tcur->getSessionID()); - - if (!_list.empty()) { - double dist = 0; - for (const TuioPoint& p : tcur->getPath()) { - dist += glm::length(glm::dvec2(p.getX(), p.getY()) - glm::dvec2(tcur->getX(), tcur->getY())); - } - dist /= tcur->getPath().size(); - if (tcur->getPath().size() < 7 && dist < 0.0004 && _list.size() == 1 && _removeList.size() == 1) { - _tapCo = TuioCursor(*tcur); - _tap = true; - } + double dist = 0; + for (const TuioPoint& p : tcur->getPath()) { + dist += glm::length(glm::dvec2(p.getX(), p.getY()) - glm::dvec2(tcur->getX(), tcur->getY())); + } + dist /= tcur->getPath().size(); + if (tcur->getPath().size() < 7 && dist < 0.0004 && _list.size() == 1 && _removeList.size() == 1) { + _tapCo = TuioCursor(*tcur); + _tap = true; } _mx.unlock(); }