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.
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.
Add Hand Manager to your scene.
Add HandGrabInteractor and modify the script options if needed
Add HandGrabInteractable to gameObject with collider or its children have.
The gameObject with collider.
The gameObject without collider but its children have.
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.
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:
Here are two methods to customize grab pose: Custom Grab Pose and Record Grab Pose.
Custom Grab Pose¶
Add CustomGrabPose to the gameObjects with HandMeshRenderer.
Disable “EnableDirectPreview” from Wave > DirectPreview > EnableDirectPreview.
Disable
Enable Collider
on the HandGrabInteractor.In Unity Editor, enter Play Mode and set the position of the hand model and the gameObject at the same location.
Modify the
Grab Gesture
of the CustomGrabPose and the position of the hand model or the gameObject until it matches your expectation.Click
Save HandGrab Pose
on the CustomGrabPose and exit the play mode.Check if the
Grab Poses settings
in HandGrabInteractable of the specified gameObject is updated.
Record Grab Pose¶
This feature depends on DirectPreview.
Enable “EnableDirectPreview” from Wave > DirectPreview > EnableDirectPreview.
Disable
Enable Collider
on the HandGrabInteractor.Start Streaming Server from Wave > DirectPreview > ControlPanel.
Ensure the VIVE XR Elite is connected to your PC and launch the VIVE Business Streaming app on the HMD.
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.
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.
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:
The
Enable Collider
property of the HandGrabInteractor needs to be set to true in order to push objects.If a 3D object has a Rigidbody with the
Is Kinematic
property disabled, then the hand model can push it.If a 3D object has a Rigidbody with the
Is Kinematic
property enabled, the expected outcome depends on whether theForce 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.
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.