From a7c14f1f17d2a3826c389aa19a0d838e67a5e9c3 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Fri, 10 Jan 2014 15:53:50 -0800 Subject: [PATCH] Only register movement if the hand isn't new. --- interface/src/devices/SixenseManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/devices/SixenseManager.cpp b/interface/src/devices/SixenseManager.cpp index 9d6b011921..9ebe4b35d1 100644 --- a/interface/src/devices/SixenseManager.cpp +++ b/interface/src/devices/SixenseManager.cpp @@ -100,9 +100,9 @@ void SixenseManager::update(float deltaTime) { palm->setRawVelocity(rawVelocity); // meters/sec palm->setRawPosition(position); - // use the velocity to determine whether there's any movement + // use the velocity to determine whether there's any movement (if the hand isn't new) const float MOVEMENT_SPEED_THRESHOLD = 0.05f; - if (glm::length(rawVelocity) > MOVEMENT_SPEED_THRESHOLD) { + if (glm::length(rawVelocity) > MOVEMENT_SPEED_THRESHOLD && foundHand) { _lastMovement = usecTimestampNow(); }