Realistic Hand Interaction

Introduction

The VIVE Wave™ plugin provides the Realistic Hand Interaction feature within its Essence packages.

The imported prefabs and samples are located at Assets/Wave/Essence/Hand/Interaction.

Both left and right hand grabber prefabs have the hand mesh, hand grabber, hand collider, and custom grab pose.

../_images/Pic00.png

The Realistic Hand Interaction feature consists of two main components: HandGrabInteractor and HandGrabInteractable.

The HandGrabInteractor updates hand tracking data and allows grabbing at gameObjects with the HandGrabInteractable component.

The HandGrabInteractor updates hand tracking data and allows grabbing at gameObjects with the HandGrabInteractable component.

The HandGrabInteractable component allows gameObjects to be grabbable. Currently, only gameObjects with at least one 3D Collider component are supported.

Also refer to Realistic Hand Interaction API.

How to Use

The Realistic Hand Interaction contains common parts and Wave-Dependent parts. You can grab an object refering to the Common Use part.

If you would like to align the hand grab pose, refer to the Wave Dependent part.

Common Use

Only the gameObjects with the HandGrabInteractor component are capable of grabbing gameObjects with the HandGrabInteractable component.

  1. Add Hand Manager to your scene.

    ../_images/Pic01.png
  2. Add HandGrabInteractor and modify the script options if needed

    ../_images/Pic02.png
    • Handedness : Set the hand for hand tracking.
    • Grab Distance : Set the grabbing distance.
    • Enable Collider : Toggle to enable or disable the hand collider. (Require Wave Hand)
    • GrabColliderManager : Set the grab collider manager. (Require Wave Hand)
  3. Add HandGrabInteractable to gameObject with collider or its children have.

    • The gameObject with collider.

      ../_images/Pic03.png
    • The gameObject without collider but its children have.

      ../_images/Pic04.png
    • Is Grabbable : Allow oneself to be grabbed.

    • Force Movable : Allow oneself to be pushed. The priority of this option is lower than that of Rigidbody. (Require Wave Hand)

    • Finger Requirement : Define which fingers are required for grabbing.

    • Grab Poses Settings : Define the hand gestures for grabbing.

  4. Set the Finger Requirement on the HandGrabInteractable of the gameObject, and then build and run to test.

    • Ignored: This finger is not needed for grabbing.
    • Optional: This finger can be used for grabbing.
    • Required: This finger is required for grabbing.

Wave Dependent

The VIVE Wave™ plugin provides default hand models. (See Wave Hand)

When grabbing a gameObject, the hand mesh may clip with the gameObject. To achieve a more realistic grabbing effect, you can customize the grab pose in the Unity Editor during Play Mode.

Once the customization is completed, the grab pose will be saved in the Grab Pose Settings of the gameObject. As a result, the gameObject will be grabbed according to the edited grab gesture during grabbing.

Here demonstrates the before-and-after comparison of setting the Grabpose, where the 1st animation as before and the 2nd animation as after results:

../_images/BeforeSetGrabPose.gif ../_images/AfterSetGrabPose.gif

Here are two methods to customize grab pose: Custom Grab Pose and Record Grab Pose.

Custom Grab Pose

  1. Add CustomGrabPose to the gameObjects with HandMeshRenderer.

    ../_images/Pic05.png
  2. Disable “EnableDirectPreview” from Wave > DirectPreview > EnableDirectPreview.

    ../_images/Pic06.png
  3. Disable Enable Collider on the HandGrabInteractor.

    ../_images/Pic07.png
  4. In Unity Editor, enter Play Mode and set the position of the hand model and the gameObject at the same location.

    ../_images/Pic08.png
  5. Modify the Grab Gesture of the CustomGrabPose and the position of the hand model or the gameObject until it matches your expectation.

    ../_images/Pic09.png
  6. Click Save HandGrab Pose on the CustomGrabPose and exit the play mode.

  7. Check if the Grab Poses settings in HandGrabInteractable of the specified gameObject is updated.

    ../_images/Pic10.png

Record Grab Pose

This feature depends on DirectPreview.

  1. Enable “EnableDirectPreview” from Wave > DirectPreview > EnableDirectPreview.

    ../_images/Pic06.png
  2. Disable Enable Collider on the HandGrabInteractor.

    ../_images/Pic07.png
  3. Start Streaming Server from Wave > DirectPreview > ControlPanel.

    ../_images/Pic11.png
  4. Ensure the VIVE XR Elite is connected to your PC and launch the VIVE Business Streaming app on the HMD.

  5. Enter play mode in the Unity Editor and see the preview on the HMD. Then, modify the position of the gameObject to a location where the hand can easily grab it.

  6. Click the Game view in the Unity Editor then you’ll need to use the keyboard to save the GrabPose. Modify the position of the hand model to match the grabbing position, then press Enter to save the GrabPose.

    ../_images/Pic12.png
  7. Check if the Grab Poses settings in HandGrabInteractable of the specified gameObject is updated.

Tip

Duplicate to other hand

  • you can click the “+” button to create a duplicate.
  • Click “IsLeft” to toggle between left and right hand grabbing.
  • Click “Align X axis”, “Align Y axis”, and “Align Z axis” will project the GrabPose onto the left-right, vertical, and front-back directions.
GrabColliderManager

This feature depends on Wave Hand.

To achieve a more realistic effect, you can add GrabColliderManager to the gameObject with HandGrabInteractor. GrabColliderManager allows the hand model to determine whether it can push a 3D object when touching. Here are a few influencing factors:

  1. The Enable Collider property of the HandGrabInteractor needs to be set to true in order to push objects.

  2. If a 3D object has a Rigidbody with the Is Kinematic property disabled, then the hand model can push it.

  3. If a 3D object has a Rigidbody with the Is Kinematic property enabled, the expected outcome depends on whether the Force Movable property of HandGrabInteractable is enabled:

    • When enabled, the hand model can still push the 3D object.
    • When disabled, the hand model won’t be able to push the 3D object and will remain stationary on it.
    • If a 3D object hasn’t HandGrabInteractable, it will behave the same as the disabled scenario described above.
  4. If the 3D object hasn’t Rigidbody but has HandGrabInteractable, the expected outcome depends on whether the Force Movable property of HandGrabInteractable is enabled:

    • When enabled, the hand model can still push the 3D object.
    • When disabled, the hand model won’t be able to push the 3D object and will remain stationary on it.