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:
parent
5283e51927
commit
a7c14f1f17
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue