Skip to content

Pinching with hand-tracking-controls is inaccurate #4689

@cesmoak

Description

@cesmoak

Description:
Currently, the pinching gesture recognized by hand-tracking-controls is inaccurate for me. pinchstarted rarely fires as expected and when releasing an object that follows the pinch gesture, it unexpectedly follows the index finger (as it is separating from the thumb) until the gesture is ended.

I suggest two changes to the existing code:

  • Increase the minimum distance between thumb and index finger needed to recognize a pinch (I found that increasing it from 0.01 meters to 0.02 meters significantly increases the frequency at which the gesture is recognized, probably partly because the finger tip positions are in the center of the fingers (and further apart than the pads of the fingers). This could also be a configurable property of the component.
  • Use the position of the midpoint between the index fingertip and the thumb fingertip for pinch events so objects following the pinch position do not incorrectly move with the index finger as the pinch is released

If these sound good, I can submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions