Whenever a hand is newly introduced, the data from the leap motion controller is unstable.
To get around this I had various decisions relying on the data locked until the data stablised. But judging when this is was difficult:
Analysing the data itself is full of assumptions that may not be correct for any given use-case.
Waiting for a specific time period will either be too short, or too long, but never just right.
Instead I had it unlock (and later, also recalibrate) when the hand reached the active zone. This worked well enough of the time that it's taken me this long to get around to doing it better.
The change
The above remains in place.
I've added an additional re-calibrate when the hand stops moving along the z axis.
I was expecting to need to keep the lock going until then. But it seems to work well. I may revisit this.
Background
Whenever a hand is newly introduced, the data from the leap motion controller is unstable.
To get around this I had various decisions relying on the data locked until the data stablised. But judging when this is was difficult:
Instead I had it unlock (and later, also recalibrate) when the hand reached the active zone. This worked well enough of the time that it's taken me this long to get around to doing it better.
The change
The above remains in place.
I've added an additional re-calibrate when the hand stops moving along the z axis.
I was expecting to need to keep the lock going until then. But it seems to work well. I may revisit this.