Hi,
I have a LeapMotion mounted above a large monitor screen (a couple of cm in front of the actual screen).
I am using the touch_distance
value to do some calculation.
The touch_distance
value works very well when it detects a pointable ~25-30 cm
directly below the LeapMotion Device. I get a reading from 0.5 to -0.3
.
On the other hand if the pointable
is a bit further away from the LeapMotion, the lower limit of the touch_distance
starts to increase. Approximately 40-50cm
away from the LeapMotion the lowest value returned by touch_distance
is 0.33
.
What am I missing here? Is this expected behavior? How should I calculate if the pointable
is close to touching the screen.
frame = controller.frame()
pointable = frame.pointables.frontmost
if pointable.is_valid:
zone = pointable.touch_distance