cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Custom Swipe Gesture(Meta XR Interaction SDK OVR Samples Debug Gesture)

eunchongHa
Honored Guest
I want to utilize the Debug Gesture Scene from the Meta XR Interaction SDK OVR Samples to create a special event that happens based on the gesture I want.  In the video below, you can see that the red node changes to a green node when there is a swipe action with hand tracking. 
 
What I would like to develop is that when I swipe my hands from the inside out, trying to push the NPC characters outward, the NPC characters will animate and take a small step backward.
 
I would like to know how to use the Debug Gesture Scene.
How can I modify it to do the behavior I want?
 eunchongHa_0-1711505584874.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Big_Flex
Expert Protege

Hi @eunchongHa, thanks for asking! I work on the Interaction SDK team, so you can tag me in any future questions you may have about Interaction SDK.

For anyone else reading this, the Debug Gesture scene is described at the top of this official doc and is included in the Interaction SDK OVR Samples package on the Unity store.

To get a custom inside-out swipe gesture, you need to change the wrist rotation and hand movement settings so they activate when you move your hands outwards instead of inwards. Here's what you need to do. These steps are identical for both hands, so I'll only describe the setup for the left hand.

  1. Under Hierarchy, select the HandMoving GameObject under the SwipeForwardGestureLeft GameObject.
    Big_Flex_1-1711658971517.png
  2. Under Inspector, set Hand Axis to Palm Backward since that's the direction we want the hand to move in to be considered active.
    Big_Flex_2-1711659013916.png
  3. Under Hierarchy, select the WristRotating GameObject. 
    Big_Flex_0-1711658948495.png
  4.  Under Inspector, set Hand Axis to Extension since when you swipe outward, you're extending your hand outward, not closing it.
    Big_Flex_0-1711659834686.png

     

  5. Under Hierarchy, select SwipeForwardGestureLeft.
    Big_Flex_3-1711659146956.png
  6. Under Inspector, add an Active State Unity Event Wrapper component. Any function you add to the When Activated() section will trigger when the swipe outward happens.
    Big_Flex_4-1711659277887.png
  7.  In the Active State Unity Event Wrapper component, set Active State to the Sequence Active State component.
    Big_Flex_5-1711659359150.png
    When you build and run your scene, swipe outward and you'll see the node debug tree light up like in this video.

View solution in original post

2 REPLIES 2

Big_Flex
Expert Protege

Hi @eunchongHa, thanks for asking! I work on the Interaction SDK team, so you can tag me in any future questions you may have about Interaction SDK.

For anyone else reading this, the Debug Gesture scene is described at the top of this official doc and is included in the Interaction SDK OVR Samples package on the Unity store.

To get a custom inside-out swipe gesture, you need to change the wrist rotation and hand movement settings so they activate when you move your hands outwards instead of inwards. Here's what you need to do. These steps are identical for both hands, so I'll only describe the setup for the left hand.

  1. Under Hierarchy, select the HandMoving GameObject under the SwipeForwardGestureLeft GameObject.
    Big_Flex_1-1711658971517.png
  2. Under Inspector, set Hand Axis to Palm Backward since that's the direction we want the hand to move in to be considered active.
    Big_Flex_2-1711659013916.png
  3. Under Hierarchy, select the WristRotating GameObject. 
    Big_Flex_0-1711658948495.png
  4.  Under Inspector, set Hand Axis to Extension since when you swipe outward, you're extending your hand outward, not closing it.
    Big_Flex_0-1711659834686.png

     

  5. Under Hierarchy, select SwipeForwardGestureLeft.
    Big_Flex_3-1711659146956.png
  6. Under Inspector, add an Active State Unity Event Wrapper component. Any function you add to the When Activated() section will trigger when the swipe outward happens.
    Big_Flex_4-1711659277887.png
  7.  In the Active State Unity Event Wrapper component, set Active State to the Sequence Active State component.
    Big_Flex_5-1711659359150.png
    When you build and run your scene, swipe outward and you'll see the node debug tree light up like in this video.

You're the best. I'll try your method.