3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-04-18 05:57:49 +02:00

Only register movement if the hand isn't new.

This commit is contained in:
Andrzej Kapolka 2014-01-10 15:53:50 -08:00
parent 5283e51927
commit a7c14f1f17

View file

@ -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();
}