# Hand Pinch action not working (OpenXR)

**URL:** <https://forum.magicleap.cloud/t/hand-pinch-action-not-working-openxr/3347>\
**Category:** Unity Development\
**Tags:** unity, hand-tracking, openxr, interactions\
**Created:** [April 3, 2024, 11:46am UTC](https://forum.magicleap.cloud/t/hand-pinch-action-not-working-openxr/3347 "2024-04-03T11:46:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![csabai.tamas.93](https://avatars.discourse-cdn.com/v4/letter/c/85e7bf/32.png) [@csabai.tamas.93](https://forum.magicleap.cloud/u/csabai.tamas.93)\
**Post date:** [April 3, 2024, 11:46am UTC](https://forum.magicleap.cloud/t/hand-pinch-action-not-working-openxr/3347/1 "2024-04-03T11:46:17Z")

</div>

**Unity Editor version** : 2022.3.22f1  
**ML2 OS version** : 1.6.0  
**Unity SDK version** : 2.1.0  
**Host OS** : Windows  
**OpenXR** : 1.10.0  
**XR Interaction Toolkit** : 3.0.1

I've created a new Unity project.  
Imported the packages: ML, OpenXR, XR Interaction Toolkit, and Samples.

Every interaction works just fine in the sample scenes, except pinching.  
I can't grab objects or do other pinch-related actions.  
There were no error messages either.

Upon pinching, the hovered object and the fingers get a blue highlight, and the pinch indicator appears, but nothing happens when I move my hands.

Am I missing something? Should it work?

Thanks for the help.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/f/ff860c17fa284a252e8dd4710d808ec679224745.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/6/6b44ebeca8c6027a872ca13153d6511d0a547fd0.png)

---

<div class="post-metadata">

**Author:** ![csabai.tamas.93](https://avatars.discourse-cdn.com/v4/letter/c/85e7bf/32.png) [@csabai.tamas.93](https://forum.magicleap.cloud/u/csabai.tamas.93)\
**Post date:** [April 3, 2024, 1:54pm UTC](https://forum.magicleap.cloud/t/hand-pinch-action-not-working-openxr/3347/2 "2024-04-03T13:54:34Z")

</div>

**SOLVED**

The problem lies within the provided _XRI Default Input Actions_ asset of the XRI's Start Assets sample.

![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/e/e72b94d2880767daeba74538f4db27e4872ecef2.png)

You have to add the OpenXR _pinchValue_ binding to the _XRI Left Interaction_'s (and _XRI Right Interaction_'s) _Select Value_ action:

_{LeftHand}/pinchValue_  
(_{RightHand}/pinchValue_)

![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/4/4c21636af2a4d61e27976d9d5910d30049b1d89d.png)

Save the asset and pinching will work again.

And unfortunately, you can't just use the _MagicLeapOpenXRInput_ asset with the XRI because all the XRI actions will break.

(Note: XRI = XR Interaction Toolkit)

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [April 3, 2024, 9:54pm UTC](https://forum.magicleap.cloud/t/hand-pinch-action-not-working-openxr/3347/3 "2024-04-03T21:54:44Z")

</div>

Thank you for sharing your findings with the community.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)\
**Post date:** [April 18, 2024, 9:55pm UTC](https://forum.magicleap.cloud/t/hand-pinch-action-not-working-openxr/3347/4 "2024-04-18T21:55:03Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
